|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Reason code 2033 even though message seems to exist on queue |
« View previous topic :: View next topic » |
Author |
Message
|
westi |
Posted: Tue Jun 12, 2007 7:41 am Post subject: Reason code 2033 even though message seems to exist on queue |
|
|
Newbie
Joined: 27 Mar 2007 Posts: 4
|
Hi all,
We have a test app that uses JMS API to send a message on a queue and then straight after receives the very same message and logs it.
This is done to reproduce the following problem in our server: From time to time we wait for ever and never receives the message.
We are using:
MQ Java Client 6.0.2.0
MQ Manager V.6
The test application does the following:
1) Create ConnectionFactory using TCP client connection type
2) Create QueueConnection
3) Create QueueSession (not transacted with auto-acknowledge)
4) Create QueueSender
5) Create TextMessage
6) Send message
7) Save msgId for later retrieval
Close QueueSender
9) Close QueueSession
10) Close QueueConnection
11) Create QueueConnection from factory in 1)
12) Create QueueSession (not transacted with auto-acknowledge)
13) Create QueueReceiver
14) Receive message using a filter like "JMSMessageID = '<msgId>'" with 2000 ms. timeout
If timeout expires with no meesage received we loop back to the receive method again
15) Close QueueSender
16) Close QueueSession
17) Close QueueConnection
This should always work - and is quite simple as well: we have one app, one thread, one queue, and the app sequentially sends and then receives one simple text message.
Still, the test fails randomly after having processed X messages.
The one message getting stucked is in fact placed on the queue as it can be browsed by the "MQ Visual Edit" tool (and HermesJMS for that matter)
So it looks like the Receiver never realizes that a message that fits the filter is actually available on the queue.
In the JMS app the receive method returns with null.
Enabling API logging by calling com.ibm.mq.jms.services.ConfigEnvironment.start() reveals that a reason code 2033 is returned from the Queue Manager.
How is this possible?
Thanks in advance.
John |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Jun 12, 2007 8:17 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Maybe the msgId is not saved correctly, and only appears to match when you look at it manually. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Jun 12, 2007 1:28 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Could there be any condition in which you try to do a receive but the session was not "started" ? _________________ MQ & Broker admin |
|
Back to top |
|
 |
rparti |
Posted: Tue Jun 12, 2007 2:16 pm Post subject: |
|
|
 Voyager
Joined: 05 Oct 2005 Posts: 86 Location: U.S.A.
|
Can you also check the jndi setting for the connection you are making |
|
Back to top |
|
 |
westi |
Posted: Thu Jun 14, 2007 12:53 pm Post subject: |
|
|
Newbie
Joined: 27 Mar 2007 Posts: 4
|
I should probably have mentioned that we use clustered managers/queues.
Anyway that was the reason for occasionally not finding the reply.
When closing the connection between request and reply there was of course no gurantee that the second connection would resolve to the same queue manager where the request was put.
Anyway, thanks for your responses. |
|
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
|
|
|
|