RabbitMQ/AMQP – Best Practice Queue/Topic Design in a MicroService Architecture [closed]

I generally find it is best to have exchanges grouped by object type / exchange type combinations. in you example of user events, you could do a number of different things depending on what your system needs. in one scenario, it might make sense to have an exchange per event as you’ve listed. you could … Read more

Messaging Confusion: Pub/Sub vs Multicast vs Fan Out

I’m confused by your choice of three terms to compare. Within RabbitMQ, Fanout and Direct are exchange types. Pub-Sub is a generic messaging pattern but not an exchange type. And you didn’t even mention the 3rd and most important Exchange type, namely Topic. In fact, you can implement Fanout behavior on a Topic exchange just … Read more

How can I recover unacknowledged AMQP messages from other channels than my connection’s own?

Unacknowledged messages are those which have been delivered across the network to a consumer but have not yet been ack’ed or rejected — but that consumer hasn’t yet closed the channel or connection over which it originally received them. Therefore the broker can’t figure out if the consumer is just taking a long time to … Read more

In which domains are message oriented middleware like AMQP useful?

This is a great question. The main uses of messaging are: scaling, offloading work, integration, monitoring, event handling, routing, networking, push, mobility, buffering, queueing, task sharing, alerts, management, logging, batch, data delivery, pubsub, multicast, audit, scheduling, … and more. Basically: anything where you need data but don’t want to make a database request. (Caching is … Read more

Check RabbitMQ queue size from client

You can actually retrieve this via the client. When you perform a queue_declare operation, RabbitMQ returns a tuple with three values: (<queue name>, <message count>, <consumer count>). The passive argument to queue_declare allows you to check whether a queue exists without modifying the server state, so you can use queue_declare with the passive option to … Read more

RabbitMQ use of immediate and mandatory bits

The immediate and mandatory fields are part of the AMQP specification, and are also covered in the RabbitMQ FAQ to clarify how its implementers interpreted their meaning: Mandatory This flag tells the server how to react if a message cannot be routed to a queue. Specifically, if mandatory is set and after running the bindings … Read more

RabbitMQ – How many queues can RabbitMQ handle on a single server?

There are not any hard-coded limits inside RabbitMQ broker. The broker will utilize all available resources (unless you set limits on some of them, they are called watermarks in RabbitMQ terminology). There are some limitations put by Erlang itself, like maximum number of concurrent processes, but if you theoretically can reach them on single node … Read more