Author |
Message
|
shindeashish |
Posted: Mon Oct 17, 2005 9:15 pm Post subject: JMS delivery Mode not working |
|
|
Novice
Joined: 06 Oct 2005 Posts: 16
|
I have a server-server MQ connection and have setup the sender and receiver channels and corresopnding local and remote queue on both servers.
The request is sent from one server to other (it listens on MDB) which sends back a response,
also the message deliverymode is set using :
Code: |
bytesMessage.setJMSDeliveryMode( DeliveryMode.NON_PERSISTENT ); |
However when response is received back it keeps on accumulating in the response queue. The first request will get its corresponding response properly but subsequent requests will get its response as response for first request since the first response has still not been removed.
Please let me know what might be wrong? |
|
Back to top |
|
 |
shindeashish |
Posted: Mon Oct 17, 2005 10:24 pm Post subject: |
|
|
Novice
Joined: 06 Oct 2005 Posts: 16
|
I have even tried with
Code: |
MQMessage message = new MQMessage();
message.persistence = MQC.MQPER_NOT_PERSISTENT; |
and
Code: |
message.expiry = 200; |
But still the message remains on queue.
Is there something I need to do while creating the queue itself. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Oct 18, 2005 3:10 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Persistance has nothing to do with messages staying on a queue when an application is trying to get them.
It is very likely that your application, for whatever reason, is not doing a destructive get on the messages, but rather a browse.
Review your JNDI settings, not your MQ settings to see if there's something there you did. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
shindeashish |
Posted: Tue Oct 18, 2005 3:19 am Post subject: |
|
|
Novice
Joined: 06 Oct 2005 Posts: 16
|
We are using MQOO_BROWSE while opening the connection to queue.
But we are also using browsenext to get a message.
Does BROWSE_NEXT gets a message with with destructive read?
If not please suggest an alternative for destructive read.? |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Oct 18, 2005 3:47 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
BROWSE explicitly leaves the message on the queue.
Why are you using browse? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
shindeashish |
Posted: Tue Oct 18, 2005 9:46 pm Post subject: |
|
|
Novice
Joined: 06 Oct 2005 Posts: 16
|
How do i do a destructive read?
What are the default get message options if nothing is set>? |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Oct 19, 2005 4:03 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Have you read the application programming guide? Or looked at the other options available in the MQOO structure? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
shindeashish |
Posted: Wed Oct 19, 2005 4:15 am Post subject: |
|
|
Novice
Joined: 06 Oct 2005 Posts: 16
|
Got it from IBM site. Thanx |
|
Back to top |
|
 |
|