Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Karaf Cellar

You're reading from  Learning Karaf Cellar

Product type Book
Published in Jul 2014
Publisher
ISBN-13 9781783984602
Pages 124 pages
Edition 1st Edition
Languages
Authors (2):
Jean Baptiste Onofre Jean Baptiste Onofre
Profile icon Jean Baptiste Onofre
Jean-Baptiste Onofré Jean-Baptiste Onofré
Profile icon Jean-Baptiste Onofré
View More author details
Toc

The event consumer


As explained before, a producer sends a cluster event message in a queue.

On the other hand, each node embeds a consumer. A consumer binds a set of handlers.

The consumer is responsible to get the cluster event messages from the different queues, and depending on the type of the cluster event, the consumer delegates the cluster event to a handler. This means that you have a handler for every type of resource.

For a consumer, we can perform the following tasks:

  • Check the current status of the consumer (on each node) using the cluster:consumer-status command, as follows:

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

    The cluster:consumer-status command accepts a node ID as the argument, as follows:

    karaf@root>  cluster:consumer-status node2:5702
       Node                       Status
      [node2:5702           ] [ON   ]
    
  • Stop the consumer of any node using the cluster:consumer-stop...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}