Chapter 9. Using alternative protocols

 

This chapter covers

  • The advantages of and how to use the MQTT protocol
  • How to use STOMP-based applications with RabbitMQ
  • How to communicate directly from a web browser using Web STOMP
  • How to publish messages to RabbitMQ over HTTP using statelessd

While AMQP 0-9-1 is designed to be a robust protocol that supports the needs of most applications that communicate with RabbitMQ, there are specific use cases where there are better choices. For example, the high-latency, unreliable networking of mobile devices can be problematic for AMQP. In contrast, AMQP’s state-based protocol may be too complicated for some application environments where client applications aren’t able to maintain long-running connections but need to publish at a high velocity. Additionally, some applications may already contain support for messaging, but not using the AMQP protocol. In each of these scenarios, RabbitMQ’s ecosystem of applications and plugins enables it to continue to be the centerpiece in your messaging architecture.

In this chapter, we’ll look at a few alternatives to the standard AMQP 0-9-1 protocol: the MQTT protocol, which is ideal for mobile applications; STOMP, a simpler alternative to AMQP; Web STOMP, designed for use in web browsers; and statelessd for high-velocity message publishing.

9.1. MQTT and RabbitMQ

9.2. STOMP and RabbitMQ

9.3. Stateless publishing via HTTP

9.4. Summary