Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Camel-Hazelcast: Configuring Consumer

$
0
0
I have a route that fills a Hazelcast IList "hlist" already running. The next
thing I would like to do is set up an additional route (seperate class) that
uses the Camel Hazelcast Consumer; listening for additions to the Hazelcast
instance already running and then continue to other endpoints.

I have followed the documentation here
<http://camel.apache.org/hazelcast-component.html#> for using the list
consumer. It mentions that there are header variables, but does not explain
how/when to use them.

When trying to run the below route, I receive "Exception in thread "main"
java.lang.NoSuchMethodError:
com.hazelcast.core.IList.addItemListener(Lcom/hazelcast/core/ItemListener;Z)V"

fromF("hazelcast:%shlist", HazelcastConstants.LIST_PREFIX)
.log("String...")
.choice()

.when(header(HazelcastConstants.LISTENER_ACTION).isEqualTo(HazelcastConstants.ADDED))
.log("...added")
.to("hazelcast:seda:end")

.otherwise()
.log("...failed to add!");

Any clarification or further implementation is appreciated,

-Doug

Viewing all articles
Browse latest Browse all 5648