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 Java / JMS » Single Queue, Multiple processes reading

Post new topic  Reply to topic
 Single Queue, Multiple processes reading « View previous topic :: View next topic » 
Author Message
Rclements
PostPosted: Thu Oct 03, 2002 9:45 am    Post subject: Single Queue, Multiple processes reading Reply with quote

Novice

Joined: 20 Jun 2002
Posts: 18

I have a single queue. and I want to launch a number of java programs which each read a message from the queue, do some stuff and repeat.

When I try this, only the first two java readers seem able to get messages form the queue. Any other java reads seem incapable of getting message from the queue.

I am assuming that this a configuration issue with MQ, or the Java APIs

any suggestions?

ricardo
Back to top
View user's profile Send private message Send e-mail
viraj
PostPosted: Fri Oct 04, 2002 2:40 am    Post subject: Reply with quote

Newbie

Joined: 03 Oct 2002
Posts: 9

Hi Ricardo,

I tried this. I had set up 3 MDB's listening on the same queue. When I send a message to queue only one MDB was picking up the message and the remaining MDB's seem to be idle. But When I started sending multiple messages (USING FOR LOOP IN THE SENDER PROGRAM) I found all the 3 mdbs were picking up the messages.

So try to increase the number of messages u send to the queue simultaneously. Then u will see all of ur programs receiving messages.

This is because if the listening program is busy processing a message, then the second listening program is activated. So JMS decides this triggerring based on some internal algorithm.
_________________
Regards
Raj
Back to top
View user's profile Send private message
Rclements
PostPosted: Mon Oct 07, 2002 7:05 pm    Post subject: Single Queue, Multiple Readers Reply with quote

Novice

Joined: 20 Jun 2002
Posts: 18

Here is the test sequence I go through.

1. Load Queue A with 900 messages (approx 10 chars in length)
2. Start Reader program #1 using blocking reads on Queue B
3. Start Reader program #2 using blocking reads on Queue B
4. Start Reader program #3 using blocking reads on Queue B
5. Start a program which reads Queue A and copyies msg to Queue B, and repeats till queue A is empty.

This was an attempt to have the reader programs all start near the same time.

Results:
Reader Program 1 read 420 or so messages
Reader Program 2 read 480 or so messages
Reader program 3 read 0 messages

I did try starting more than 3 reader programs and any additional reader programs that might be running also read 0 messages.

??
ricardo
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 » IBM MQ Java / JMS » Single Queue, Multiple processes reading
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.