|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
Issues in getting messages in Multi Threaded environment |
View previous topic :: View next topic |
Author |
Message
|
RB |
Posted: Wed Jul 23, 2008 3:52 pm Post subject: |
|
|
Acolyte
Joined: 23 May 2006 Posts: 56
|
I think it is sligtly different in my case. Once hit with the issue, I was never able to get the message untill I restart the external application. The application has a way of triggering, by which the external app can try to poll the queue. Each time, it was coming to this method, getting a handle from the pool to the qmgr, opening the queue with the options provided and failing to retrieve the message. At the same time, other threads for successfully able to retrieve the handle from the pool, and poll other queues.
And the test we have tried is to use the same connection handle, open the queue with new options. And it is working!!. So I am not sure whether it is a stale connection issue in this case!
Regards,
RB |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jul 24, 2008 9:47 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20763 Location: LI,NY
|
Remember that triggering tells you to use a get with wait on the triggered program. The reason is because you may be able to trigger faster than the message becomes available. You need to build in a REASONABLE wait time.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
PeterPotkay |
Posted: Thu Jul 24, 2008 9:53 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7723
|
You will only get triggered once the message is in fact available (or the odd case where the app message that triggers gets rolled back). The reason for the wait is to see if any additional messages show up to avoid constant retriggering. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
RB |
Posted: Mon Aug 04, 2008 1:31 pm Post subject: |
|
|
Acolyte
Joined: 23 May 2006 Posts: 56
|
We are not using trigger on the queues for this, I was just mentioning about the mechanism we have in place to start the polling!
Btw, today we noticed that we were setting the messageflag to MQC.MQMF_LAST_SEGMENT when putting the message even if there is only one message as part of that group. The code has the logic to split into multiple messages depending on the message size, and even in case of one message it was using this option. When we removed this, the code on the get side also seems to work fine (I am yet to confirm this, since the occurrence of the issue itself was not consistent in the first place!).
But it would be of great help to know if someone has seen such behavior with these options. Or if you see any possibility of the get message call failing with a message having message flag values “Last segment, MSG.mqmf_last_segment” and there is only one message in the group. Let me know your thoughts!
Regards,
RB |
|
Back to top |
|
 |
RB |
Posted: Mon Aug 04, 2008 4:48 pm Post subject: |
|
|
Acolyte
Joined: 23 May 2006 Posts: 56
|
I just want to add that the java program is running on Linux and trying to connect to a queue manager running on Unix. In the older versions, we had Unix OS on both sides and had never faced any issue. Not sure whether the OS can have any effect on this specific case!
Regards,
RB |
|
Back to top |
|
 |
|
|
|
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
|
|
|
|