RabbitMQ 3.9 now Available for CloudAMQP

CloudAMQP is happy to announce that RabbitMQ version 3.9, along with features like Streams, is now available for our customers. In this blog post, we will go through the most significant features.

How to upgrade to RabbitMQ 3.9

If you already have a CloudAMQP cluster you can easily upgrade to 3.9 from the Nodes view in the CloudAMQP Console or via the API. Upgrading minor versions or RabbitMQ will result in some downtime, as the whole cluster has to be offline. Minimum allowed Erlang version is 23.2, so you might need to upgrade Erlang first. You can read more about the details of upgrading RabbitMQ and Erlang.

What are RabbitMQ Streams?

There are two components of the stream functionality, stream queues and the stream protocol. Stream queues are persistent and replicated, and works similar to an append-only log. Stream queues can be used with traditional AMQP clients, i.e. they don’t have to use the stream protocol. Messages in stream queues are not removed when consumed, instead they can be consumed over and over again using an offset or a timestamp. Streams also comes with its very own stream protocol, which has shown to be much faster than AMQP in RabbitMQ.

Benefits of using RabbitMQ Streams

  • Large number of consumers can easily consume the same message.
  • Messages can be consumed multiple times.
  • Messages will stay in queues until they are expired with retention policies.
  • High throughput when using the stream protocol.
  • Streams can easily store millions of messages without issues (which is not always
  • the case with traditional queue-type messages in RabbitMQ)
  • Alternative to Apache Kafka.

How to get started with RabbitMQ Streams

The streams functionality can be set up by creating a stream queue straight away. To start using the streams protocol the streams plugin needs to be enabled. You can enable the plugin from the Plugins view in the CloudAMQP Console or via the API.

Stream queues

To add a stream queue, select the queue type Stream, and optional arguments such as max retention time or size.

RabbitMQ stream queues screenshot

To declare a stream queue in your client, set the x-queue-type queue argument to stream.

Note that you do not have to use the streams protocol to be able to use stream queues.

Stream protocol

The stream protocol is a binary protocol listening on port 5552 and 5551 (TLS). Make sure to enable the streams plugin and that the ports for the streams protocol are open. Ports will be open by default.

RabbitMQ stream queues firewall screenshot

The currently supported client libraries by the RabbitMQ Team for the stream protocol are the RabbitMQ Stream Java Client and the RabbitMQ Stream Go Client.

Other new functionality in RabbitMQ 3.9

Erlang 24 Support

RabbitMQ 3.9 (and some of the later 3.8.x-versions) has support for Erlang 24. Erlang 24 has a new just-in-time compiler that gives much higher throughput, between 20-50% higher for many test cases. In an upcoming blog post we’ll dive into the details of this.

Logging in JSON

Logging can be done in JSON instead of Lager.

Stay in touch with CloudAMQP

We hope that you will enjoy RabbitMQ 3.9 as much as we do. If you have any questions or comments on the blog above, send us an email at contact@cloudamqp.com

All the best, CloudAMQP team

CloudAMQP - industry leading RabbitMQ as a service

Start your managed cluster today. CloudAMQP is 100% free to try.

13,000+ users including these smart companies