|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
DistributionList's problem |
« View previous topic :: View next topic » |
Author |
Message
|
softwind |
Posted: Fri Apr 02, 2004 3:34 am Post subject: DistributionList's problem |
|
|
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 |
|
 |
mqonnet |
Posted: Fri Apr 02, 2004 7:54 am Post subject: |
|
|
 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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|