Hello.  I created a demonstration application that can send messages from one
VM to another using Terracotta.  What you can do is create a special Camel
component that corresponds to a LinkedBlockingQueue that has been clustered
with Terracotta.  This means that you can connect one Camel instance in one
VM to another Camel instance in another VM.

When you create a component in one Camel context, for example "tc:input"
that component will then be available in any other Camel context that is
using the TC Component.

The sample is simple to try out for yourself, assuming you have Maven (no
other infrastructure is required, as Maven will download and install
everything you need).  Here's steps:

$ svn co http://svn.terracotta.org/svn/forge/projects/labs/tim-camel
$ cd tim-camel
$ mvn clean install
$ cd sample
$ mvn tc:start
$ mvn tc:run
$ mvn tc:run

After the first tc:run, a receiver will startup.  The second tc:run will
send 10 messages to the receiver.

So on the first console, you'll see this:

[INFO] [node] Starting camel context to receive messages

Then, the second:

[INFO] [node] Starting camel context to send messages

Then, the first console will report:

[INFO] [node] tc:input Test Message: 0
[INFO] [node] tc:input Test Message: 1
[INFO] [node] tc:input Test Message: 2
[INFO] [node] tc:input Test Message: 3
[INFO] [node] tc:input Test Message: 4
[INFO] [node] tc:input Test Message: 5
[INFO] [node] tc:input Test Message: 6
[INFO] [node] tc:input Test Message: 7
[INFO] [node] tc:input Test Message: 8
[INFO] [node] tc:input Test Message: 9


-- 
View this message in context: 
http://www.nabble.com/Working-Terracotta-Component---Clustered-Queues-in-Camel-tp15941549s22882p15941549.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to