activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Bish <tabish...@gmail.com>
Subject Re: How to get original destination of scheduled message
Date Thu, 27 Mar 2014 13:58:07 GMT
On 03/27/2014 05:40 AM, Evgeniy wrote:
> According to this article
> http://timbish.blogspot.com/2010/10/enhanced-jms-scheduler-in-activemq.html
> I can work with scheduled messages in such a way:
>
> Destination browseDest = session.createTemporaryQueue();
> Destination requestBrowse =
> session.createTopic(ScheduledMessage.AMQ_SCHEDULER_MANAGEMENT_DESTINATION);
> MessageProducer producer = session.createProducer(requestBrowse);
> javax.jms.Message request = session.createMessage();
> request.setStringProperty(ScheduledMessage.AMQ_SCHEDULER_ACTION,
> ScheduledMessage.AMQ_SCHEDULER_ACTION_BROWSE);
> request.setJMSReplyTo(browseDest);
> producer.send(request);
>
> MessageConsumer browser = session.createConsumer(browseDest);
> javax.jms.Message scheduledMessage = browser.receive(5000);
>
> If I want to remove this message and schedule another one to the same queue
> how I can get original destination of scheduledMessage?
>
> ((ActiveMQTextMessage) message).getOriginalDestination() is always null
>
> Regards, Evgeniy
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/How-to-get-original-destination-of-scheduled-message-tp4679573.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Recommend you create a Junit test case or modify one of the current 
one's to demonstrate what you want to achieve and what's not currently 
working and attach that to a new Jira issue.  Someone can look into it 
from there.

-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.fusesource.com | www.redhat.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/


Mime
View raw message