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 » IBM MQ API Support » DistributionList's problem

Post new topic  Reply to topic
 DistributionList's problem « View previous topic :: View next topic » 
Author Message
softwind
PostPosted: Fri Apr 02, 2004 3:34 am    Post subject: DistributionList's problem Reply with quote

Newbie

Joined: 02 Apr 2004
Posts: 1

I'm using ActiveX in delphi,code like:
for I := 0 to QueueList.Count - 1 do
begin
LaneNo := QueueList.Strings[I];
QueueName := 'Reply.Queue.' + LaneNo;
MQ_List.AddDistributionListItem(QueueName);
end;

when put the message,only last queue can receive the message in the param -QueueList.
but when replace the code to:
MQ_List.AddDistributionListItem('Reply.Queue.1');
MQ_List.AddDistributionListItem('Reply.Queue.2');
MQ_List.AddDistributionListItem('Reply.Queue.3');

All queue can receive the message.any idea for this?
Back to top
View user's profile Send private message
mqonnet
PostPosted: Fri Apr 02, 2004 7:54 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

I havent done much of this, but here's my take on this.

I think you need to create and initialize a distributionlistitem for each item that you want to add to the list. Say for example, you have reply.queue.1,2 and 3. Your code should probably look like this.

for I := 0 to QueueList.Count - 1 do
begin
LaneNo := QueueList.Strings[I];
QueueName := 'Reply.Queue.' + LaneNo;

DistListItem = MQ_List.AddDistributionListItem(QueueName);
end;

Where DistListItem is a variable of type MQDistributionListItem. Make this an array so that you could point to each queue using each array element.

The reason this needs to be done is the way MQ structures are designed. MQDistributionListItem is the counterpart of MQRR, MQOR structures which are used to handle each record in the distribution list. Where record is an MQ object, in this case queue. If you have 3 queues, you would have 3 records in a c app, and similarly 3 distlistitems in your case.

Without this, how do you expect to catch the response for each op. Say the reason code for the put op on each queue???

Not saying this would resolve it. But i found this piece missing in your code and believe this should correct your problem.

Why it is working when you explictly call adddistlistitem 3 times. I dont know. Do you initialize this definition into a distlistitem???


Cheers
Kumar
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » DistributionList's problem
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.