Menu

Archive for the 'HowTo' Category

How to Monitor Authentication Attempts

March 1, 2021 by Diana Parra Corbacho

We have been constantly improving the monitoring capabilities that are built into RabbitMQ since shipping native Prometheus support in 3.8.0. Monitoring the broker and its clients is critically important for detecting issues before they affect the rest of the environment and, eventually, the end users.

RabbitMQ 3.8.10 exposes client authentication attempts metrics via both the Prometheus endpoint and the HTTP API.

Read More...

Understanding memory use with RabbitMQ 3.4

October 30, 2014 by Simon MacMullen

“How much memory is my queue using?” That’s an easy question to ask, and a somewhat more complicated one to answer. RabbitMQ 3.4 gives you a clearer view of how queues use memory. This blog post talks a bit about that, and also explains queue memory use in general.

Read More...

Breaking things with RabbitMQ 3.3

April 2, 2014 by Simon MacMullen

What? Another “breaking things” post? Well, yes, but hopefully this should be less to deal with than the previous one. But there are enough slightly incompatible changes in RabbitMQ 3.3.0 that it’s worth listing them here.

Read More...

Distributed Semaphores with RabbitMQ

February 19, 2014 by Alvaro Videla

In this blog post we are going to address the problem of controlling the access to a particular resource in a distributed system. The technique for solving this problem is well know in computer science, it’s called Semaphore and it was invented by Dijkstra in 1965 in his paper called “Cooperating Sequential Processes”. We are going to see how to implement it using AMQP’s building blocks, like consumers, producers and queues.

Read More...

Preventing Unbounded Buffers with RabbitMQ

January 23, 2014 by Alvaro Videla

Different services in our architecture will require a certain amount of resources for operation, whether these resources are CPUs, RAM or disk space, we need to make sure we have enough of them. If we don’t put limits on how many resources our servers are going to use, at some point we will be in trouble. This happens with your database if it runs out of file system space, your media storage if you fill it with images and never move them somewhere else, or your JVM if it runs out of RAM. Even your back up solution will be a problem if you don’t have a policy for expiring/deleting old backups. Well, queues are no exception. We have to make sure that our application won’t allow the queues to grow for ever. We need to have some strategy in place to delete/evict/migrate old messages.

Read More...

Using Consumer Priorities with RabbitMQ

December 16, 2013 by Alvaro Videla

With RabbitMQ 3.2.0 we introduced Consumer Priorities which not surprisingly allows us to set priorities for our consumers. This provides us with a bit of control over how RabbitMQ will deliver messages to consumers in order to obtain a different kind of scheduling that might be beneficial for our application.

When would you want to use Consumer Priorities in your code?

Read More...

Federated queues in 3.2.0

October 23, 2013 by Simon MacMullen

So we added support for federated queues in RabbitMQ 3.2.0. This blog post explains what they’re for and how to use them.

Read More...

Using Elixir to write RabbitMQ Plugins

June 3, 2013 by Alvaro Videla

RabbitMQ is a very extensible message broker, allowing users to extend the server’s functionality by writing plugins. Many of the broker features are even shipped as plugins that come by default with the broker installation: the Management Plugin, or STOMP support, to name just a couple. While that’s pretty cool, the fact that plugins must be written in Erlang is sometimes a challenge. I decided to see if it was possible to write plugins in another language that targeted the Erlang Virtual Machine (EVM), and in this post I’ll share my progress.

Read More...

Breaking things with RabbitMQ 3.0

November 19, 2012 by

RabbitMQ includes a bunch of cool new features. But in order to implement some of them we needed to change some things. So in this blog post I’m going to list some of those things in case you need to do anything about them.

Read More...

Sizing your Rabbits

September 24, 2011 by Matthew Sackman

One of the problems we face at the RabbitMQ HQ is that whilst we may know lots about how the broker works, we don’t tend to have a large pool of experience of designing applications that use RabbitMQ and which need to work reliably, unattended, for long periods of time. We spend a lot of time answering questions on the mailing list, and we do consultancy work here and there, but in some cases it’s as a result of being contacted by users building applications that we’re really made to think about long-term behaviour of RabbitMQ. Recently, we’ve been prompted to think long and hard about the basic performance of queues, and this has lead to some realisations about provisioning Rabbits.

Read More...

Using the RabbitMQ service on Cloud Foundry with Node.JS

August 16, 2011 by Michael Bridgen

Recently we launched a RabbitMQ service for Cloud Foundry, making it simple to spin up a message broker to use with your apps on Cloud Foundry. There are tutorials online for using it with Ruby on Rails and with Java apps using Spring. Here we are going to look at using the RabbitMQ service with Node.JS apps.

Read More...

Federation plugin preview release

June 22, 2011 by Simon MacMullen

Note: this blog post talks about the federation plugin preview that was released for RabbitMQ 2.5.0. If you’re using 2.6.0 or later, federation is part of the main release; get it the same way you would any other plugin.

Another day, another new plugin release 😃 Today it’s federation. If you want to skip this post and just download the plugin, go here. The detailed instructions are here.

The high level goal of federation is to scale out publish / subscribe messaging across WANs and administrative domains.

To do this we introduce the concept of the federation exchange. A federation exchange acts like a normal exchange of a given type (it can emulate the routing logic of any installed exchange type), but also knows how to connect to upstream exchanges (which might in turn themselves be federation exchanges).

Read More...

Who are you? Authentication and authorisation in RabbitMQ 2.3.1

February 7, 2011 by Simon MacMullen

RabbitMQ 2.3.1 introduces a couple of new plugin mechanisms, allowing you much more control over how users authenticate themselves against Rabbit, and how we determine what they are authorised to do. There are three questions of concern here:

  1. How does the client prove its identity over the wire?
  2. Where do users and authentication information (e.g. password hashes) live?
  3. Where does permission information live?

Question 1 is answered in the case of AMQP by SASL - a simple protocol for pluggable authentication mechanisms that is embedded within AMQP (and various other protocols). SASL lets a client and a server negotiate and use an authentication mechanism, without the “outer” protocol having to know any of the details about how authentication works.

SASL offers a number of “mechanisms”. Since the beginning, RabbitMQ has supported the PLAIN mechanism, which basically consists of sending a username and password over the wire in plaintext (of course possibly the whole connection might be protected by SSL). It’s also supported the variant AMQPLAIN mechanism (which is conceptually identical to PLAIN but slightly easier to implement if you have an AMQP codec lying around). RabbitMQ 2.3.1 adds a plugin system allowing you to add or configure more mechanisms, and we’ve written an example plugin which implements the SASL EXTERNAL mechanism.

Read More...

rabbitmq + node.js = rabbit.js

November 12, 2010 by Michael Bridgen
For those who have been away from the internets, node.js is an evented JavaScript engine based on Google’s V8. Because it is essentially one big, efficient event loop, it’s a natural fit for programs that shuffle data backwards and forwards with little state in-between. And it’s fun to program, an opinion apparently lots of people share, because there have been loads of libraries crop up around it. Among the more impressive of these libraries is Socket.
Read More...

Prompt-a-licious

October 2, 2010 by Michael Bridgen

I am setting up my old MacBook, reclaimed from my housemate, to be usable for the programmings.

Read More...