|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
PUT fails when queue is open??? |
« View previous topic :: View next topic » |
Author |
Message
|
MS-fan |
Posted: Wed May 28, 2008 2:17 pm Post subject: PUT fails when queue is open??? |
|
|
Newbie
Joined: 28 May 2008 Posts: 2
|
Hi,
After struggling around for more than a month with MQ on mainframe communicating with a hand-over windows service code in C#, i have been encountering problems again lately.
The windows service starts a thread that listens to the MQ queue on the mainframe, gets the messages and stores it in an SQL Server database. This all happens inside this thread.
I have managed to take control back from MQ's GET method, when i try to stop the service by setting the waitinterval to everything except -1. Don't ask me how long it took me to figure out that control was lost when GET was busy with waitinterval -1. Thank God there was internet.
For efficiency i thought it was ridiculous to open and close/disconnect MQ in my listener thread all the time...so i open everything 1 time and keep listening for messages.
Now when we try to place messages on the queue, the mainframe complains that the queue is being used(???). We stopped the service and managed to PUT the messages from the mainframe.
Now my question:
Is there any way to open the queue in shared mode for getting messages and not have MQ locking the queue? Is MQ designed this way that if someone is listening on the queue, no other one can PUT something on the queue???...since it is a queue, it should work in a FIFO way and last message would be at the end of the queue..so why listening for messages can disturb the process of PUT?
I think IBM need to update their MQ programming references, because i see methods in the hand-over code that are not even described in it, while the code still compiles. Also those error reason codes and compcodes might need some good description as well. Without internet you don't even know what those reasoncodes mean.
I am using C# with MQSeries 6.0.
Sorry for getting frustated with MQ usage...but everytime i feel i am at the end of my work, then MQ surprises me with some unexpected error/problem again, getting me back to the start...just a real pain in da butt (sigh) |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed May 28, 2008 3:08 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
|
Back to top |
|
 |
David.Partridge |
Posted: Wed May 28, 2008 11:32 pm Post subject: |
|
|
 Master
Joined: 28 Jun 2001 Posts: 249
|
Don't open the queue in exclusive mode, if you do use exclusive mode, then you will see the problem you describe. _________________ Cheers,
David C. Partridge |
|
Back to top |
|
 |
MS-fan |
Posted: Thu May 29, 2008 2:52 am Post subject: |
|
|
Newbie
Joined: 28 May 2008 Posts: 2
|
Thanks.
The queue is opened with the following options:
openOptions = MQC.MQOO_INPUT_SHARED | MQC.MQOO_FAIL_IF_QUIESCING | MQC.MQOO_ALTERNATE_USER_AUTHORITY | MQC.MQOO_INQUIRE;
The GET is done with
gmo = new MQGetMessageOptions();
gmo.Options = MQC.MQGMO_WAIT | MQC.MQGMO_FAIL_IF_QUIESCING;
gmo.WaitInterval = 8;
I don't think i am using excluded mode |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu May 29, 2008 2:55 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Sure that's for the get. What about the put? and what about the qdef?
 _________________ MQ & Broker admin |
|
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
|
|
|
|