Hi

Yes you can use steps to group X together and have events emitted for
start/complete

On Tue, Aug 1, 2023 at 9:13 AM ski n <raymondmees...@gmail.com> wrote:

> Would this possibly work?
>
> <route id="route1">
>  <from uri="activemq:queue:order.in"/>
>   <step id="route1">     <to uri="bean:orderService?method=validate"/>
>      <to uri="direct-vm:processOrder"/>  </step></route>
> <route id="route2">
>  <from uri="direct-vm:processOrder"/>
>   <step id="route2">     <to uri="bean:orderService?method=process"/>
>      <to uri="activemq:queue:order.out"/>
>   </step></route>
>
> And then use the StepStartEvent (or StepCompletedEvent). Or is this on
> on lifecycle level and not on a message exchange level?
>
> --
>
> Raymond
>
>
> On Tue, Aug 1, 2023 at 8:58 AM Claus Ibsen <claus.ib...@gmail.com> wrote:
>
> > Hi
> >
> > No there is not
> >
> > On Tue, Aug 1, 2023 at 8:49 AM ski n <raymondmees...@gmail.com> wrote:
> >
> > > Currently, I use the EventNotifier to collect events in Camel:
> > >
> > >
> > >
> >
> https://www.javadoc.io/doc/org.apache.camel/camel-api/3.21.0/org/apache/camel/spi/CamelEvent.html
> > >
> > > I have integrations that consist of 1 or more routes like this:
> > >
> > > <route>
> > >  <from uri="activemq:queue:order.in"/>
> > >  <to uri="bean:orderService?method=validate"/>
> > >  <to uri="direct-vm:processOrder"/></route>
> > > <route>
> > >  <from uri="direct-vm:processOrder"/>
> > >  <to uri="bean:orderService?method=process"/>
> > >  <to uri="activemq:queue:order.out"/></route>
> > >
> > > To route between two routes I use either:
> > >
> > > - direct-vm
> > > - vm
> > > - activemq
> > >
> > > When I filter the Events on ExchangeCreated I get for each route that
> is
> > > created exactly one message. 2 routes gives 2 events, 10 routes give 10
> > > events.
> > >
> > > In camel 4 the direct-vm and vm are removed and the direct and seda
> > > endpoints can be used as alternatives. This however sees all the routes
> > as
> > > one exchange, so that there is only one ExchangeCreated event. Other
> > events
> > > like ExchangeSent give more events, but they are not 1 on 1 with a
> > specific
> > > route.
> > >
> > > Is there a way to get/keep this functionality in Camel 4 when switching
> > to
> > > the direct endpoint?
> > >
> > > --
> > >
> > > Raymond
> > >
> >
> >
> > --
> > Claus Ibsen
> > -----------------
> > @davsclaus
> > Camel in Action 2: https://www.manning.com/ibsen2
> >
>


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

Reply via email to