[ 
https://issues.apache.org/jira/browse/CAMEL-25082?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Work on CAMEL-25082 started by Claus Ibsen.
-------------------------------------------
> camel-disruptor - a request/reply timeout marks the caller's exchange as 
> ignored, so a redelivery or fallback to disruptor is dropped
> -------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-25082
>                 URL: https://issues.apache.org/jira/browse/CAMEL-25082
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-disruptor
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Major
>
> When a request/reply send to a disruptor endpoint times out, 
> {{DisruptorProducer}} sets the property 
> {{DisruptorEndpoint.DISRUPTOR_IGNORE_EXCHANGE}} so the consumer skips the 
> timed-out exchange if it has not processed it yet. The property is set on the 
> *caller's* exchange, not on the copy that was published into the ring buffer:
> {code:java}
> final Exchange copy = prepareCopy(exchange, false);   // published
> ...
> exchange.setProperty(DisruptorEndpoint.DISRUPTOR_IGNORE_EXCHANGE, true);   // 
> on timeout
> {code}
> So:
> # the published copy never carries the property, and the consumer still 
> processes a timed-out exchange that it had not started yet;
> # the caller's exchange keeps the property, and every later copy of it 
> inherits it ({{prepareCopy}} copies the properties). {{DisruptorConsumer}} 
> drops any exchange that has the property (it checks {{containsKey}}, not the 
> value), without a log above TRACE. So:
> #* a redelivery by the error handler after the timeout is dropped by the 
> consumer, and times out again: redeliveries can never succeed;
> #* a fallback to another disruptor endpoint, e.g. 
> {{doCatch(ExchangeTimedOutException.class).to("disruptor:fallback")}}, is 
> dropped: an InOnly fallback message is lost silently, an InOut one times out 
> again.
> The same check is applied in {{DisruptorReference}} to exchanges buffered 
> while the disruptor is reconfigured.
> The property should be set on the published copy, and the consumer should 
> honour the value of the property. camel-seda is not affected: 
> {{SedaProducer}} removes the timed-out copy from the queue and does not mark 
> the caller's exchange.
> Found in the review of CAMEL-25038 (PR #26913).
> _Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to