Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-14335

Configuring DLQ

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 3.0.0
    • Fix Version/s: None
    • Component/s: camel-core
    • Labels:
      None
    • Estimated Complexity:
      Advanced

      Description

      I'm getting weird comportement when i try to use the original body

          DeadLetterChannelBuilder deadLetterChannelBuilder = new DeadLetterChannelBuilder();
          deadLetterChannelBuilder.setRedeliveryPolicy(new RedeliveryPolicy().disableRedelivery());
          deadLetterChannelBuilder.useOriginalBody();
      

      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

      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"));
      

      My scenario is:

      1. The module not running i pushing to the foo queue some 'wrong' data
      2. I start the module
      3. I get in dead queue the body 'test'
      4. I push the same 'wrong' data again and this time i get the 'wrong' data in dead queue

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              michael992 michael elbaz
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: