This example demonstrates how you can use Camel-Infinispan Starter component. The example is really simple: put a key/value pair in a remote cache and get the same key. This example starts an Infinispan server with Infinispan Docker Image, so it can run OOTB.
camel infra run infinispan only provisions the "default" cache-container on the server, it does not
create a cache inside it. So the application itself creates the "default" cache on startup, via the
RemoteCacheManager bean in InfinispanConfiguration, the same approach Camel’s own Infinispan test
suite uses (RemoteCacheManager#administration().getOrCreateCache(…)).
Start an Infinispan server using the Camel CLI:
$ camel infra run infinispan
You can run this example using:
$ mvn spring-boot:run
And you should see output in the console.
By default, the example connects to localhost:11222 with the admin/password credentials that
camel infra run infinispan uses. To point at a different server, set the INFINISPAN_HOST,
INFINISPAN_PORT, INFINISPAN_USERNAME and INFINISPAN_PASSWORD environment variables.
If you hit any problem using Camel or have some feedback, then please let us know.
We also love contributors, so get involved :-)
The Camel riders!