camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hayden74 <>
Subject Publishing events using Camel - best approach with example
Date Mon, 13 Apr 2015 22:21:12 GMT
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:
Sent from the Camel - Users mailing list archive at

View raw message