Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
hazelcast:[ map | multimap | queue | topic | seda | set | atomicvalue | instance]:cachename[?options]
Warning

Topic support is available as of Camel 2.15. 

 

Options

Name

Required

Description

hazelcastInstanceNoSince Camel 2.14 The hazelcast instance reference name which can be used for hazelcast endpoint. If you don't specify the instance reference, camel use the default hazelcast instance from the camel-hazelcast instance.

...

  1. Usage of #map
  2. Usage of #multimap
  3. Usage of #queue
  4. Usage of #topic
  5. Usage of #list
  6. Usage of #seda
  7. Usage of atomic number
  8. Usage of #cluster support (instance)

...

Code Block
fromF("hazelcast:%smm", HazelcastConstants.QUEUE_PREFIX)
   .log("object...")
   .choice()
	.when(header(HazelcastConstants.LISTENER_ACTION).isEqualTo(HazelcastConstants.ADDED))
        	.log("...added")
		.to("mock:added")
	.when(header(HazelcastConstants.LISTENER_ACTION).isEqualTo(HazelcastConstants.REMOVED))
		.log("...removed")
		.to("mock:removed")
	.otherwise()
		.log("fail!");

Anchor
topic
topic

Usage of Topic

Topic producer – to(“hazelcast:topic:foo”)

The topic producer provides one operarion (publish).

Sample for add:
Code Block
from("direct:add")
.setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.ADD_OPERATION))
.toF("hazelcast:%sbar", HazelcastConstants.QUEUE_PREFIX);
Sample for put:

 

Anchor
list
list

Usage of List

...

The list producer provides 4 operations (add, set, get, removevalue).

Sample for add:
Code Block
from("direct:add")
.setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.ADD_OPERATION))
.toF("hazelcast:%sbar", HazelcastConstants.LIST_PREFIX);

...