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

Reply via email to