asynchronously perform tasks given from producers to consumers

messages are processed once by a single consumer

difference from pubsub

Pub-Sub vs. Message Queues

  • it uses pubsub model

Conversely, to message queues, in a pub-sub architecture we want all our consuming (subscribing) applications to get at least 1 copy of the message that our publisher posts to an exchange.

mq

1-1

pubsub

1-2

final comparison: Pub-Sub vs. Message Queues | Baeldung