Hi

Ah yeah that is a good point to be able to use the existing trace to avoid
creating a new.
You are welcome to create a JIRA and if you can try to find a solution and
send a PR

On Fri, Jun 10, 2022 at 10:05 AM Chio Chuan Ooi <chioch...@gmail.com> wrote:

> Hi All,
>
> I using camel saga pattern with opentracing, but notice that when
> compensation or completion is being done, it creating a new trace. while
> reading on the code, i notice that that is due to new exchange is being
> created during compensation/completion.
>
> is that anyway to copy the exchange instead of create new exchange when
> compensation/completion is being done ?
>
> {code}
>     private Exchange createExchange(Endpoint endpoint, CamelSagaStep step)
> {
>         Exchange exchange = endpoint.createExchange();
>         exchange.getIn().setHeader(Exchange.SAGA_LONG_RUNNING_ACTION,
> getId());
>
>         Map<String, Object> values = optionValues.get(step);
>         if (values != null) {
>             for (Map.Entry<String, Object> entry : values.entrySet()) {
>                 exchange.getIn().setHeader(entry.getKey(),
> entry.getValue());
>             }
>         }
>         return exchange;
>     }
> {code}
>
>
>
> Thanks and Regards,
> Chio Chuan
>


-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to