Book Image

Learning Karaf Cellar

By : Jean Baptiste Onofre, Jean-Baptiste Onofré
Book Image

Learning Karaf Cellar

By: Jean Baptiste Onofre, Jean-Baptiste Onofré

Overview of this book

Table of Contents (16 chapters)

The event producer

Each Cellar node embeds a cluster event producer. The producer is used when the node has to send an event to the other nodes.

The producer is responsible for the following functions:

  • To create the cluster event message.

  • To send the cluster event message in a target distributed queue. The queue is unique and can be identified by the cluster group and the type of resource. For instance, a possible queue name is book.bundles, where book is the cluster group's name and bundles is the type of the resource. Thanks to this, Cellar is able to send a cluster event per resource and is able to target this cluster event only to a given cluster group.

It's possible to manage the producer of a node from any node.

For instance, we can see the current status of the producer using the following cluster:producer-status command:

karaf@root> cluster:producer-status
   Node                       Status
  [node2:5702           ] [ON   ]
* [node1:5701           ] [ON   ]

Here, we can see the status...