Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MQJMS2002E failed to get message from MQ queue

Status
Not open for further replies.

lecmns

Programmer
Sep 11, 2001
19
IN
--------------------------------------------------------------------------------
Folks..

I am stuck with another problem.

I have nearly 5000 messages coming into the queue.
I have only one listener instance listening on the queue from server side to process it. I do spawn up threads inside the listener as and when a message si received. But I doubtif it can handle these many at a time.

Is there a solution for this?

I tried creating say nearly listener instances on the same queue with a multi threaded program.

but when it receives a message in the queue, it's giving this error

"2002.02.27 11:39:31 MQJMS2002E failed to get message from MQ queue"

What could be the problem? I have tried in the net to find some decription about it but all in vein. Guys, help me!!

Can I spawn more than one listener instance all using the same selector tag, on the same queue? If it receives a message, will it be picked up by all of these listeners or only one of them? I know these are basic doubts, but it's really messing up my ideas about MQ.

It's URGENT!! HELP ME!!

regards
MNS lecMns
B'lore
 
There is a class which enables you to get at the MQ-specific reason codes - it is probably in the Java classes (not JMS) - MQError or something (sorry - don't have any reference material to hand). Anyway, this will tell you exactly why your threads are failing.

As for having multiple threads reading a queue, yes it shouldn't be a problem. Unfortunately JMS hides a lot of the standard MQ options from you so I'm not sure how you would specify all of them (if you even can).

Make sure your queue has Default Share options set to 'Shared' rather than 'Exclusive'. Hopefully your JMS program is opening the queue with the default but if not you'll need to find out how to set this. Post back if you are still stuck.

Cheers,
Paul
 
Would u mind in telling whether your problem is solved or not. Earlier i was able to write code in JMS to create multiple thread and pick the messages.. didnt had any problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top