Author |
Message
|
ganesh3 |
Posted: Thu Aug 10, 2006 10:13 pm Post subject: Unable to get Message using recieve() Method of JMS API |
|
|
Apprentice
Joined: 30 Mar 2006 Posts: 35
|
Hi,
I am not getting messages on alternate attempts from the reply queue. I am using the recieve(timeout) method of teh JMS API. I am not getting any MQ Error nor any application error. When i do a recieve on the reply queue after doing the look up using servicelocator, the message printed is "null" on alternate attempts. I am getting the messages from the reply queue based on JMSCorrelationId match. The request messages are being put on the queue successfully. I am using WAS 3.5 and IBM MQSeries 5.2. Kindly help.
Thanks,
Ganesh Bhat. _________________ Have a Good Day!!! |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Aug 11, 2006 1:23 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Did you start the connection before attempting the receive. If in a request reply model did you make sure that the request was committed before listening for the reply? _________________ MQ & Broker admin |
|
Back to top |
|
 |
ganesh3 |
Posted: Fri Aug 11, 2006 8:25 pm Post subject: RE: Unable to get Message using recieve() Method of JMS API |
|
|
Apprentice
Joined: 30 Mar 2006 Posts: 35
|
Hi,
Thanks for the reply. Yes, I did start the connection. After initiating a request message I close all the connection, queue sessions and the queues. When looking up the reply queue I again re open the connection and the queues and the queue session. The messages are picked up based on teh JMSCorrelationID match.
I am getting messages on alternate attempts. So I think the connection and lookup is happening correctly. But I am not getting any specific MQ Error Codes nor any Application Error when I dont recieve the message.
Kindly help.
Thanks,
Ganesh Bhat. _________________ Have a Good Day!!! |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Aug 12, 2006 7:55 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Do you have load balancing set up but only one server is running? _________________ MQ & Broker admin |
|
Back to top |
|
 |
ganesh3 |
Posted: Sat Aug 12, 2006 9:50 am Post subject: RE: Unable to get Message using recieve() Method of JMS API |
|
|
Apprentice
Joined: 30 Mar 2006 Posts: 35
|
Hi,
Thanks. Yes load balancing is setup and both the servers are up. But on one server the messages does not get picked up by the application and the messages get piled up on the same. I am unable to understand the reasona s no MQ Error codes or application error is recieved.
Kindly help.
Thanks,
Ganesh Bhat. _________________ Have a Good Day!!! |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Aug 12, 2006 2:03 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Have you checked that there is no error at start up of the server where the messages are piling up? Like unable to connect to MQ?
In order to see any error messages in this case you would need to have report on expiry set up and the message to expire. You would also need a process to regularly browse the queue or to be on V6.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
ganesh3 |
Posted: Sat Aug 12, 2006 7:15 pm Post subject: RE: Unable to get Message using recieve() Method of JMS API |
|
|
Apprentice
Joined: 30 Mar 2006 Posts: 35
|
Hi,
Thanks. Yes , I have checked that there is no error on MQ and server start up.
Quote: |
In order to see any error messages in this case you would need to have report on expiry set up and the message to expire.
|
Kindly let me know how is reporting done on expired messages.
Quote: |
You would also need a process to regularly browse the queue or to be on V6
|
I am unable to understand the letters in bold. Kindly explain.
Thanks,
Ganesh Bhat. _________________ Have a Good Day!!! |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Aug 13, 2006 3:34 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Aug 14, 2006 2:00 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Okay, here's the deal.
You have a request-reply scenario. In that scenario, an application attached to qmgr 1 sends a message, and then waits for a reply on it's queue with a specific ID.
If the server puts that reply to the CLUSTER, then you will see what you see. That the replies get load balanced, and you only get the reply your app wants (with the same id) on qmgr 1 half the time!
You need to use the Reply To Queue Manager property. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
ganesh3 |
Posted: Wed Aug 16, 2006 8:38 pm Post subject: RE: Unable to get Message using recieve() Method of JMS API |
|
|
Apprentice
Joined: 30 Mar 2006 Posts: 35
|
Hi,
Thanks.
Quote: |
You need to use the Reply To Queue Manager property.
|
The JMS API does not provide to set the Reply Queue Manager Name. It allows to set the Reply to Queue Name, which I have already set when the messages are being sent. We are currently using MQ Series 5.2 and will later migrate to V6.
Kindly help.
Thanks,
Ganesh Bhat. _________________ Have a Good Day!!! |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Aug 17, 2006 1:52 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The JMS API lets you specify a reply destination. This destination can include a queue manager name. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
ganesh3 |
Posted: Thu Aug 17, 2006 2:31 am Post subject: RE: Unable to get Message using recieve() Method of JMS API |
|
|
Apprentice
Joined: 30 Mar 2006 Posts: 35
|
Hi,
Does this mean that we look up the Queue Manger and fetch reply messages based on the JMSCorrelation ID's and not lookup the individual queues when recieving the message.
Kindly let me know.
Thanks,
Ganesh Bhat. _________________ Have a Good Day!!! |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Aug 17, 2006 2:32 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
jefflowrey wrote: |
The JMS API lets you specify a reply destination. This destination can include a queue manager name. |
This destination should be in the form of :
Code: |
Destination mydest = Session.createQueue("queue://QMGRNAME/QNAME?att1=val1&attn=valn"); |
If the message is not originating from a JMS system (no RFH header) the qmgrname and qname value are taken from the MQMD.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
ganesh3 |
Posted: Thu Aug 17, 2006 2:39 am Post subject: RE: Unable to get Message using recieve() Method of JMS API |
|
|
Apprentice
Joined: 30 Mar 2006 Posts: 35
|
Hi,
What do the att1 and att2 attribute stand for? Also, I would be using the JNDI name to look up the Reply Queue Manager.
Thanks,
Ganesh Bhat _________________ Have a Good Day!!! |
|
Back to top |
|
 |
Vitor |
Posted: Thu Aug 17, 2006 2:44 am Post subject: Re: RE: Unable to get Message using recieve() Method of JMS |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
ganesh3 wrote: |
Hi,
What do the att1 and att2 attribute stand for? Also, I would be using the JNDI name to look up the Reply Queue Manager.
Thanks,
Ganesh Bhat |
From the Using Java manual:
Quote: |
The URI for a queue begins with the sequence queue://, followed by the name
of the queue manager on which the queue resides. This is followed by a further
/, the name of the queue, and optionally, a list of name-value pairs that set the
remaining Queue properties. |
There's an example a bit further down in the book. Look it up.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|