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

Concurrent modification of exchange during retry after netty TCP failure leads to futher processing of failed messages

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.13.1
    • 2.15.3, 2.16.0
    • camel-netty
    • None
    • Unknown

    Description

      When a exception occurs on a netty TCP channel such as ChanelClosedException then there are two invocations of the producer callback.

      If there is a redelivery handler configured this causes either two threads to be added to the scheduled thread-pool which then compete or in the more common case the first invocation adds the redelivery thread but in doing so clears the exception from the exchange such that when the subsequent callback invocation occurs it see's the event as a success and continues routing of the exchange.

      Note this also seems to be a cause of negative inflight messages on the route.

      The first callback invocation occurs in the ChannelFutureListener which is the usual case.

      The second callback invocation which comes from the ClientChannelHandler registered in the DefaultClientPipelineFactory used by the NettyProducer.

      Attachments

        1. NettyRedeliveryTest.java
          6 kB
          Bob Browning

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              ukcrpb6 Bob Browning
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: