Chapter 9. ActiveMQ messaging for other languages


This chapter covers

  • Using scripting languages via STOMP
  • Exploring ActiveMQ NMS with C#
  • Exploring ActiveMQ CMS with C++
  • Using the ActiveMQ REST API
  • Using the ActiveMQ Ajax API

Thus far we’ve been focused on ActiveMQ as a JMS broker and explored various ways of using it in Java environment. But ActiveMQ is more than just a JMS broker. It provides an extensive list of connectivity options, so it can be seen as a general messaging solution for a variety of development platforms. In this chapter we’ll cover all ActiveMQ aspects related to providing messaging services to different platforms. We’ll start by exploring the STOMP (Streaming Text Orientated Messaging Protocol) protocol, which due to its simplicity plays an important role in messaging for scripting languages. Examples in Ruby, Python, PHP, and Perl will demonstrate the ease of messaging with STOMP and ActiveMQ. Next, we’ll focus on writing clients for C++ and .NET platforms with appropriate examples. Finally, we’ll see how ActiveMQ could be used in the Web environment through its REST and Ajax APIs. By the end of this chapter, you’ll see that ActiveMQ isn’t just another Java message broker, but rather a general messaging platform for various environments. Before we go into details on specific platforms, we have to define the examples we’ll be using throughout this chapter.

9.1. Adapting the stock portfolio example

9.2. Messaging for scripting languages

9.3. Messaging for compiled languages

9.4. Messaging on the web with ActiveMQ

9.5. Summary