camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hayden74 <hdr...@gmail.com>
Subject VirtualTopic message acknowledgment/confirmation
Date Wed, 24 Feb 2016 23:37:30 GMT
Hi guys,
We use VirtualTopics for event publishing and recently one of the consumers
failed to process the message from the event due to some database error.
>From the ActiveMQ perspectives, the message has been delivered. The client,
however, failed to process it. So my question is, is there a way to send
acknowledgment/confirmation to ActiveMQ once the message has been received
and processed successfully? otherwise, the message will have to be
re-delivered to the consumer for a number of times with fixed intervals eg:
re-deliver 10 times, with 1 hour between each delivery. 

Here the code I am using:


*Producer code*
...
        .from("jms:queue:sales.events")
	.log("Event Type: ${header.eventType}")
	.to("activemq:topic:VirtualTopic.sales.contractChanged")



    *Consumer code*
    @JmsListener(destination =
"Consumer.Privileges.VirtualTopic.sales.contractChanged")
    public void processContractsFromQueue(String someString) {

          //process someString and confirm if all good, otherwise reply
(somehow) with an error message to tell the queue to re-deliver the message
later. 

    }





--
View this message in context: http://camel.465427.n5.nabble.com/VirtualTopic-message-acknowledgment-confirmation-tp5778240.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message