Enterprise Integration Zone is brought to you in partnership with:

Christian is a Principal Middleware Specialist/Architect at Red Hat specializing in developing enterprise software applications with an emphasis on software integration and messaging. His strengths include helping clients build software using industry best practices, Test Driven Design, ActiveMQ,Apache Camel, ServiceMix, Spring Framework, and most importantly, modeling complex domains so that they can be realized in software. He works primarily using Java and its many frameworks, but his favorite programming language is Python. He's in the midst of learning Scala and hopes to contribute to the Apache Apollo project. Christian is a DZone MVB and is not an employee of DZone and has posted 51 posts at DZone. You can read more from them at their website. View Full User Profile

The Apache Apollo REST API (the New ActiveMQ)

01.03.2013
| 5074 views |
  • submit to reddit

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, 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!

Published at DZone with permission of Christian Posta, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)