I want to use Camel to basically do the following asynchronously:

- System A triggers newAccountCreated spring event
- System A - event handler publishes the event to a Camel route "accounts"
- Camel receives the event and delivers it to System X, Y and Z

What is the best approach to implement the above? are there any
examples/tutorials to go through?

The examples I've checked so far don't show clearly how to publish events
from the producer or consuming by a consumer.

So far I've got the below and stuck with how to deliver the message to the
consumer and how the consumer would receive it

Producer (System A) - delivering the message to Camel: ProducerTemplate
camelTemplate = context.getBean("camelTemplate", ProducerTemplate.class);
camelTemplate.sendBody("jms:queue:accounts", ExchangePattern.InOnly, "New
Account Created");

Camel - receiving the message from the producer and publish it to consumers:
from("jms:queue:accounts").log("message: ${body}").to("what to do here? how
should the message be delivered to the consumer(X, Y, Z)?");

Consumer(s) - how would consumers receive the message from Camel?



--
View this message in context: 
http://camel.465427.n5.nabble.com/Publishing-events-using-Camel-best-approach-with-example-tp5765717.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to