You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by NNNZZZ <nz...@gettailgate.com> on 2008/12/10 17:03:44 UTC

javax.jms.JMSException: No original destination for message:

Hello there,

I am trying to stop the consumers from listening without stopping them.

To do so I am changing the message selector on the consumer (to 1 > 1).

However when I change it back (to 1 = 1) the pending messages are not
resent. I need to actually recreate the container and the consumer (I am
using spring.Net) and the the pending messages are resent.

To overcome this I to get the pending messages Ids (which I got from JVM)
and then invoke the retryMessage message of
org.apache.activemq.broker.region.Queue (got that object from JVM\JMx as
well).

However when I do so I am getting the following error:

javax.jms.JMSException: No original destination for message:
05d79c66-be01-4db1-adc6-73384475a6f9:1:1:1

Does anyone know why this error is happening and whether I should have
called retryMessage in the first place, or should I call another method?

Lastly? Is there a better why to stop getting messages without stopping the
process of current messages within the consumers? (stopping container kills
the threads and messages that are already in process fail..)

Thanks

N
-- 
View this message in context: http://www.nabble.com/javax.jms.JMSException%3A-No-original-destination-for-message%3A-tp20937812p20937812.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: javax.jms.JMSException: No original destination for message:

Posted by NNNZZZ <nz...@gettailgate.com>.


James.Strachan wrote:
> 
> 2008/12/10 NNNZZZ <nz...@gettailgate.com>:
>>
>> Hello there,
>>
>> I am trying to stop the consumers from listening without stopping them.
>>
>> To do so I am changing the message selector on the consumer (to 1 > 1).
> 
> JMS and ActiveMQ don't support changing the selector in a client
> without stopping and starting the consumer.
> 
> What are you actually trying to achieve? Maybe there's a better way to
> do what you're trying to do.
> 
> I'd say either close the consumers; or inform the broker to suspend a
> consumer?
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> Open Source Integration
> http://fusesource.com/
> 
> 


Hi there,

What I need is a way to 'drain-stop' the listeners, so NO new messages will
be received, but the process of messages that are already in process will be
completed without disruption. I also need an option to start it again so new
messages and pending message will be consumed as normal.

Changing the selector was just an attempt to achieve the above.

I am using spring.Net and i tried
Spring.Context.Support.ContextRegistry.Clear() and
SimpleMessageListenerContainer.Stop() but both methods caused failure for
messages that were already in process by the consumers (Thread aborted
method) - those methods just stopped the consumer completely.

About you suggestions:

I'd say either close the consumers; or inform the broker to suspend a
consumer?

I think closing the consumer will cause failure for messages that are
already in process. But maybe suspending the consumer by the broker will
sort it.

Would you be able to direct me of how that can be done?

I am using spring.Net, but to change the selector I tried changing the live
objects in JVM via MBeanServerConnection and JMXServiceURL.

Many thanks!

N


-- 
View this message in context: http://www.nabble.com/javax.jms.JMSException%3A-No-original-destination-for-message%3A-tp20937812p20939221.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: javax.jms.JMSException: No original destination for message:

Posted by James Strachan <ja...@gmail.com>.
2008/12/10 NNNZZZ <nz...@gettailgate.com>:
>
> Hello there,
>
> I am trying to stop the consumers from listening without stopping them.
>
> To do so I am changing the message selector on the consumer (to 1 > 1).

JMS and ActiveMQ don't support changing the selector in a client
without stopping and starting the consumer.

What are you actually trying to achieve? Maybe there's a better way to
do what you're trying to do.

I'd say either close the consumers; or inform the broker to suspend a consumer?

-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/