Hi Chio Chuan,

Feel free to raise a PR and I can take a look at it.

Thanks,
Zheng Feng

On Sat, Jun 11, 2022 at 12:10 PM Chio Chuan Ooi <chioch...@gmail.com> wrote:

> Hi Claus,
>
> Ticket https://issues.apache.org/jira/browse/CAMEL-18186 created for the
> issue.
>
> I have some solution/workaround that I am doing locally which creates a map
> within the SagaCoordinator by the step.
> when finalizing the coordinator, the existing exchange is being copied
> instead creating a new exchange.
>
> It looks to be working on my local but not sure if that is a good solution
> as it keeps the exchange in memory.
>
>
> Thanks and Regards,
> Chio Chuan
>
>
> On Fri, Jun 10, 2022 at 4:31 PM Claus Ibsen <claus.ib...@gmail.com> wrote:
>
> > 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