You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by sakkew <sa...@gmail.com> on 2008/11/19 16:55:45 UTC
Programmatically reprocessing messages from a dead letter queue
I need to integrate functionality to an existing system so that operators can
manually reprocess messages from a dead letter queue, that is to put them
back into the original queue.
I use the QueueViewMBean as shown below. The message is put back to the
original queue and processed by the ActiveMQ server as it should, but if the
message fails again, the message disappears. When I restart the server the
message appears in the DLQ as it should.
Here's the code (I used the Web Monitor as base):
QueueViewMBean queue = broker.getQueue(dlq);
queue.moveMessageTo(mapMessage.getJMSMessageID(),
mapMessage.originalDestination());
Is there something in the message that should be reset to avoid confusing
the reprocessing?
Both client and server uses ActiveMQ 5.1
cheers,
Sakke
--
View this message in context: http://www.nabble.com/Programmatically-reprocessing-messages-from-a-dead-letter-queue-tp20582823p20582823.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Programmatically reprocessing messages from a dead letter queue
Posted by Dejan Bosanac <de...@ttmsolutions.com>.
Hi,
I've created a test case that tries to reproduce your problem
(attached), but it passes against the trunk version of the code.
What version of ActiveMQ are you using? Can you assure that this test
case simulates the desired behavior?
Cheers
--
Dejan Bosanac
http://www.ttmsolutions.com - get a free ActiveMQ user guide
ActiveMQ in Action - http://www.manning.com/snyder/
Scripting in Java - http://www.scriptinginjava.net
sakkew wrote:
> I need to integrate functionality to an existing system so that operators can
> manually reprocess messages from a dead letter queue, that is to put them
> back into the original queue.
>
> I use the QueueViewMBean as shown below. The message is put back to the
> original queue and processed by the ActiveMQ server as it should, but if the
> message fails again, the message disappears. When I restart the server the
> message appears in the DLQ as it should.
>
> Here's the code (I used the Web Monitor as base):
> QueueViewMBean queue = broker.getQueue(dlq);
> queue.moveMessageTo(mapMessage.getJMSMessageID(),
> mapMessage.originalDestination());
>
> Is there something in the message that should be reset to avoid confusing
> the reprocessing?
>
>
> Both client and server uses ActiveMQ 5.1
>
>
> cheers,
> Sakke
>
>