|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQBROWSE & MQGET |
« View previous topic :: View next topic » |
Author |
Message
|
krishs |
Posted: Mon Feb 11, 2002 5:50 am Post subject: |
|
|
Newbie
Joined: 03 Feb 2002 Posts: 8 Location: Chennai
|
Can some body give solution for this?
In our Java Application,I am running two threads.
One for nornal MQGET and another to Browse Messages on the Queue. Both are accessing same Queue. When Browse Thread try to get a Message, the MQGET thread has already removed it from the Queue. How to overcome this application?
Is there a option in MQ to set options while browsing no MQGET and while MQGET no browing?
Thanx in Advance,
Krishnan |
|
Back to top |
|
 |
bduncan |
Posted: Wed Feb 13, 2002 4:40 pm Post subject: |
|
|
Padawan
Joined: 11 Apr 2001 Posts: 1554 Location: Silicon Valley
|
Krishnan,
Could you perhaps explain what you are trying to accomplish with this scheme? There is probably a better way to set up your MQSeries queues and/or code your applications to avoid this problem. However, if there is no alternate way to architect things, you could possible solve the problem by opening the queue for exclusive access. In other words, when either application issues the MQOPEN call to open the queue, you would pass MQOO_INPUT_EXCLUSIVE as an open option. This way, until the application closes the queue, no other application will be able to open the queue for MQGETs. Of course, this raises a new issue. Now only one of your programs can open the queue at a time. And this of course introduces race conditions, starvation, etc... depending on how your applications deal with the queue being already opened exclusively by another application. I think if you could explain your configuration in more detail, we could probably architect a better way to access the queue in question so that you don't have to deal with these issues.
_________________ Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator |
|
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
|
|
|
|