ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » Namelist

Post new topic  Reply to topic
 Namelist « View previous topic :: View next topic » 
Author Message
masteringmq
PostPosted: Mon Nov 03, 2008 12:37 am    Post subject: Namelist Reply with quote

Master

Joined: 20 Oct 2008
Posts: 200

DEFINE NL(COUNTRY) NAMES(QM1,QM2)

I imagine the above will send messages to QM1 and QM2. Now I define the namelist on my gateway. In my gateway there is alias queue pointing to QM1 and QM2. How do I put a message on the namelist and have it route the message to QM1 and QM2?. Is there any sample MQ script?
Back to top
View user's profile Send private message
David.Partridge
PostPosted: Mon Nov 03, 2008 12:46 am    Post subject: Reply with quote

Master

Joined: 28 Jun 2001
Posts: 249

You can't put messages to a namelist.

All you can do with a namelist is to issue an MQINQ call to find out what its contents are.

If you are using MQ on pretty much any platform than z/OS you can use a distribution list to put the same message to multiple queues. If you need to put the same message to multiple queues, on z/OS, and you don't wish to hard code the queue names in the application (or its own config file), then you can use a namelist to store the names of the queues to which you are to put the messages.

Take a look at the source code amqsptl0.c to see how to use a distribution list.
_________________
Cheers,
David C. Partridge
Back to top
View user's profile Send private message
masteringmq
PostPosted: Mon Nov 03, 2008 1:57 am    Post subject: Reply with quote

Master

Joined: 20 Oct 2008
Posts: 200

Any sample in Java. I use Java.

amqsptl0.c - Comes along with MQ installation?.
Back to top
View user's profile Send private message
masteringmq
PostPosted: Thu Nov 13, 2008 1:32 am    Post subject: Reply with quote

Master

Joined: 20 Oct 2008
Posts: 200

I imagine I can create a distribution list at the application level. I can use vectors for example. Please advice.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Nov 13, 2008 2:52 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

masteringmq wrote:
I imagine I can create a distribution list at the application level. I can use vectors for example. Please advice.


I imagine you can as well. Vectors would be one way. There's certainly no reason why you can't open multiple queues in an application and put messages to each, subject to resource constraints obviously.

If you're putting to a lot of queues, you might want to consider a pub/sub model. It may be easier & more scaleable.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
masteringmq
PostPosted: Thu Nov 13, 2008 3:26 am    Post subject: Reply with quote

Master

Joined: 20 Oct 2008
Posts: 200

I imagine using every concept available will be good for my learning curve.
Back to top
View user's profile Send private message
masteringmq
PostPosted: Thu Nov 13, 2008 6:21 pm    Post subject: Reply with quote

Master

Joined: 20 Oct 2008
Posts: 200

Application Example:

MQDistributionListItem[] dil = new MQDistributionListItem[2];
MQDistributionListItem li1 = new MQDistributionListItem();
li1.queueName = "PONY.1";
dil[0] = li1;
MQDistributionListItem li2 = new MQDistributionListItem();
li2.queueName = "PONY.2";
dil[1] = li2;
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Nov 13, 2008 9:17 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

masteringmq wrote:
Application Example:

MQDistributionListItem[] dil = new MQDistributionListItem[2];
MQDistributionListItem li1 = new MQDistributionListItem();
li1.queueName = "PONY.1";
dil[0] = li1;
MQDistributionListItem li2 = new MQDistributionListItem();
li2.queueName = "PONY.2";
dil[1] = li2;


Check out the java samples.... I'm sure there is a distribution list example somewhere. If not search the net, you'll find one..

Are you just creating the DL or are you retrieving a name list to build your DL?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Namelist
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.