activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Evgeniy <superrubir...@gmail.com>
Subject How to get original destination of scheduled message
Date Thu, 27 Mar 2014 09:40:01 GMT
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.

Mime
View raw message