You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "michael elbaz (Jira)" <ji...@apache.org> on 2019/12/26 17:41:00 UTC
[jira] [Issue Comment Deleted] (CAMEL-14335) Configuring DLQ
[ https://issues.apache.org/jira/browse/CAMEL-14335?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
michael elbaz updated CAMEL-14335:
----------------------------------
Comment: was deleted
(was: Not resolved )
> Configuring DLQ
> ---------------
>
> Key: CAMEL-14335
> URL: https://issues.apache.org/jira/browse/CAMEL-14335
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 3.0.0
> Reporter: michael elbaz
> Priority: Major
>
> I'm getting weird comportement when i try to use the original body
> {code:java}
> DeadLetterChannelBuilder deadLetterChannelBuilder = new DeadLetterChannelBuilder();
> deadLetterChannelBuilder.setRedeliveryPolicy(new RedeliveryPolicy().disableRedelivery());
> deadLetterChannelBuilder.useOriginalBody();
> {code}
> When i start my module for the first time is consuming some data from rabbitmq then i don't get the original body (when error happen) but the transformed one later when i push the same 'wrong' message (without restarting my module) i will get the originalBody
> Here the route
> {code:java}
> from("rabbitmq:foo?queue=foo")
> .routeId("foo")
> // Preserve directory content
> .errorHandler(deadLetterChannel("rabbitmq:dead?queue=dead")
> .useOriginalBody() // If i use useOriginalMessage() instead it will work as expected
> .onPrepareFailure(exchange -> {
> Exception exception = exchange.getProperty(EXCEPTION_CAUGHT, Exception.class);
> // ...
> }))
> .setBody(constant("test"));
> {code}
> My scenario is:
> # The module not running i pushing to the foo queue some 'wrong' data
> # I start the module
> # I get in queue dead the body 'test'
> # I push the same 'wrong' data again and this time i get the 'wrong' data in dead queue
--
This message was sent by Atlassian Jira
(v8.3.4#803005)