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

Reply via email to