Christian Posta

About Christian Posta

Christian is a Principal Consultant at FuseSource specializing in developing enterprise software applications with an emphasis on software integration and messaging.

Apache Apollo REST API

Apache Apollo is a next-generation, high-performance, multi-protocol messaging broker built from the ground up to one day be a drop-in replacement of ActiveMQ 5.x. I have blogged about it in the past (Part I has already been published with part II on its way).

Apollo’s non-blocking, asynchronous architecture allows it to be super fast and scale very well on multi-core systems using a minimal number of threads. The supported protocols include AMQP[amqtp], STOMP, MQTT, and ActiveMQ’s native binary protocol, Openwire. Among all of the cool features implemented in Apollo, the one I want to briefly introduce is the REST API.
 
 
Apollo will soon have a JMX API just like ActiveMQ, but in the meantime, the REST API is much more amenable to automated management or broker inspection. At the moment, there are three main sections to the API:

  • Broker
  • Session
  • Config

Broker

With the broker API, you have access to the heart of Apollo and each individual Virtual Host. A Virtual Host is a grouping of store, authentication mechanisms, and destinations useful for implementing multi-tenancy. You can manage each Virtual Host’s destinations (topics, queues) by inspecting existing destinations, deleting ones that should no longer be around, or creating new ones.

Also available are details about the connectors (these are what allow Apollo to take incoming connections from clients), or existing connections. With the REST API, you can start and stop connectors, delete connections, or even bring down the entire broker.

Session

The session API is responsible for authenticating a user so that they have access to the API.

Config

Use the Config API to view existing configuration or change configuration which would be in effect immediately (no restart required).

The REST API makes it easy to administer Apollo. You can view each REST endpoint and its details at http://localhost:61680/api/index.html using the default installation (could be different URL depending on where you configured your Administration endpoint to be). The Apollo console is built on top of the REST API and a new improved UX console is on its way.

I highly recommend taking a look at Apollo!
 

Reference: Apache Apollo REST API from our JCG partner Christian Posta at the Christian Posta Software blog.

Related Whitepaper:

Functional Programming in Java: Harnessing the Power of Java 8 Lambda Expressions

Get ready to program in a whole new way!

Functional Programming in Java will help you quickly get on top of the new, essential Java 8 language features and the functional style that will change and improve your code. This short, targeted book will help you make the paradigm shift from the old imperative way to a less error-prone, more elegant, and concise coding style that’s also a breeze to parallelize. You’ll explore the syntax and semantics of lambda expressions, method and constructor references, and functional interfaces. You’ll design and write applications better using the new standards in Java 8 and the JDK.

Get it Now!  

Leave a Reply


nine × 5 =



Java Code Geeks and all content copyright © 2010-2014, Exelixis Media Ltd | Terms of Use | Privacy Policy
All trademarks and registered trademarks appearing on Java Code Geeks are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries.
Java Code Geeks is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.

Sign up for our Newsletter

20,709 insiders are already enjoying weekly updates and complimentary whitepapers! Join them now to gain exclusive access to the latest news in the Java world, as well as insights about Android, Scala, Groovy and other related technologies.

As an extra bonus, by joining you will get our brand new e-books, published by Java Code Geeks and their JCG partners for your reading pleasure! Enter your info and stay on top of things,

  • Fresh trends
  • Cases and examples
  • Research and insights
  • Two complimentary e-books