Author |
Message
|
MrRothstein |
Posted: Thu May 17, 2007 12:01 pm Post subject: TemporaryQueue from weblogic. |
|
|
Newbie
Joined: 01 Mar 2007 Posts: 8
|
Hello,
I'm running into a problem receiving messages on a temporary queue.
A client creates a temp queue and sets it into the JMSReplyTo field of a message, puts the message on a queue and blocks on receiver.recieve() for the temporary queue. An MDB recieves the message, does some processing and sends a reply to the replyTo queue. The client never receives the message. I can see the message in the queue in mq explorer. However, as soon as the client returns from receive (timesout) and deletes the queue, the queue goes away.
Is there anything that I should be setting on the reply message? I'm calling the receive from client with just a timeout parameter (no selectors).
Thanks |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Thu May 17, 2007 12:11 pm Post subject: Re: TemporaryQueue from weblogic. |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
MrRothstein wrote: |
Hello,
I'm running into a problem receiving messages on a temporary queue.
A client creates a temp queue and sets it into the JMSReplyTo field of a message, puts the message on a queue and blocks on receiver.recieve() for the temporary queue. An MDB recieves the message, does some processing and sends a reply to the replyTo queue. The client never receives the message. I can see the message in the queue in mq explorer. However, as soon as the client returns from receive (timesout) and deletes the queue, the queue goes away.
Is there anything that I should be setting on the reply message? I'm calling the receive from client with just a timeout parameter (no selectors).
Thanks |
If there is no selectors it means that receiver should get every message from queue even if this message is not reply from ypur request.
Don't you select reply message by correlid ?
Maybe this is reason why there is message in queue and you don't recieve message in your application. _________________ Marcin |
|
Back to top |
|
 |
MrRothstein |
Posted: Thu May 17, 2007 12:18 pm Post subject: |
|
|
Newbie
Joined: 01 Mar 2007 Posts: 8
|
The client creates the temporary queue. All of the messages that arrive on it should belong to (be selected for) that client. I'm not sure if there is any benefit to using a selector in this case.
Thanks |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu May 17, 2007 12:30 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Why are you browsing? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
MrRothstein |
Posted: Thu May 17, 2007 12:42 pm Post subject: |
|
|
Newbie
Joined: 01 Mar 2007 Posts: 8
|
I'm not sure I understand.
After seeing the mdb logging that a reply was sent successfully and the client not receiving the reply, I decided to look at the mq explorer console to see if the message was being put to the correct queue. I'm not using a queue browser to read the reply message in the client.
Thanks |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu May 17, 2007 12:45 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I was confusing this thread with someone else who was having issues with a queue getting full. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Thu May 17, 2007 12:52 pm Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
MrRothstein wrote: |
The client creates the temporary queue. All of the messages that arrive on it should belong to (be selected for) that client. I'm not sure if there is any benefit to using a selector in this case.
Thanks |
Have you tryied to test it with simpler scenario ?
Without sending request just try to get message from this dynamic queue.
Are you sure that your app try to receive message from proper queue ?
In request -response scenario it is better to use selector.
With selectors you could run app with many instances. _________________ Marcin |
|
Back to top |
|
 |
MrRothstein |
Posted: Thu May 17, 2007 12:57 pm Post subject: |
|
|
Newbie
Joined: 01 Mar 2007 Posts: 8
|
I'm fairly sure the replies are going to the correct queue. Since after the client times out, it deletes the queue and i see it go away in the explorer.
I'm still not sure about selectors. It was my understanding that using selectors under heavy load is bad. I therefore chose to have each request execute with its own temporary queue.
Thanks. |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Thu May 17, 2007 1:21 pm Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
Does it work with standard (not dynamic ) queues ?
Have you tested it with this configuration ? _________________ Marcin |
|
Back to top |
|
 |
MrRothstein |
Posted: Thu May 17, 2007 3:37 pm Post subject: |
|
|
Newbie
Joined: 01 Mar 2007 Posts: 8
|
I'm using spring's JmsTemplate in the client. I'm starting to think the connection is not being started... I've tried putting a message to the temp queue right after creating it from the client, and it still doesnt receive it.
Edit:
Ok. Creating a connection and starting it in the client worked. Not sure if it's me misusing the jmsTemplate or not...
Thanks guys. |
|
Back to top |
|
 |
MrRothstein |
Posted: Thu May 17, 2007 4:25 pm Post subject: |
|
|
Newbie
Joined: 01 Mar 2007 Posts: 8
|
Final post. It's not them, it's me. JmsTemplate methods that execute messaging actions take a boolean that specifies if the connection needs to be started. I wasn't setting it.
Thanks again. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu May 17, 2007 5:55 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
MrRothstein wrote: |
Final post. It's not them, it's me. JmsTemplate methods that execute messaging actions take a boolean that specifies if the connection needs to be started. I wasn't setting it.
Thanks again. |
The old JMS trick. To send a message you just need a connection. To receive a message you need a "started" connection ...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|