Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8620327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:33:16+00:00 2026-06-12T06:33:16+00:00

When using RabbitMQ for sending messages you basically have exchanges, queues and bindings. I’ve

  • 0

When using RabbitMQ for sending messages you basically have exchanges, queues and bindings. I’ve understood their idea and how they relate to each other, but I am not quite sure who sets up what.

Basically, I have three scenarios in my application.

Scenario 1: One publisher, several worker processes

What I want to achieve is one component that sends messages to a queue, and there shall be several worker processes that handle items in that queue. This seems quite easy to me. The setup is as follows:

  • Exchange: 1 exchange with type ‘direct’
  • Queue: 1 queue
  • Binding: The queue is bound to the exchange

Whenever a message is sent to the exchange, it gets delivered to the queue, and the worker processes get their tasks.

Everything shall be durable.

So who sets up what? In my opinion:

  • Producer creates exchange
  • Producer creates queue (as there currently may be no worker processes running, and the message would be lost otherwise if there was no queue)
  • Producer does the binding of the queue to the exchange
  • Consumers simply listen on the queue

Right?

Scenario 2: One publisher, several subscribers, volatile messages

The second scenario is quite different. Basically, it’s a pub / sub scenario where each message is send to every currently listening client. If a client goes offline, it does not receive messages any longer and they are not stored anywhere for him. This means the following setup:

  • Exchange: 1 exchange with type ‘fanout’
  • Queue: n queues, one for each consumer
  • Binding: Each queue needs to be bound to the exchange

So who sets up what? In my opinion:

  • Producer creates exchange
  • Consumer creates queue (as it is its own queue, and the producer can not know whoever is interested in the messages)
  • Consumer creates binding for its queue to the exchange
  • Consumer listens to its queue

Right?

Scenario 3: One publisher, several subscribers, durable messages

Basically the same as scenario 2, but the messages should not be lost if a consumer goes offline. In my opinion this should not change anything – right?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T06:33:17+00:00Added an answer on June 12, 2026 at 6:33 am

    I think what you say is right except on Scenario 3.

    If messages should not be lost if a consumer goes offline then you need durable queues and the queues can’t be auto_delete’d.

    Everything else seems right to me.

    In the case of scenario 2 you could also let RabbitMQ auto-generate queue names for you and then let those queues be auto-delete’d once the consumer disconnects.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We've got an application which will be using RabbitMQ and have several different queues
What's the best practice to do this? Basically I am using rabbitMQ and it
I have an existing RabbitMQ deployment that that a few Java applications are using
I'm trying to publish messages to RabbitMQ, from a Ruby script (using Bunny )
I'm using RabbitMQ on an EC2 instance and I have the Mnesia tables on
We're using flume and I need to collect some log messages into rabbitmq. I
What message queues are people using for their Rails apps and what was the
I have a Windows Service that retrieves messages from a RabbitMQ queue. The service
We have the following scenario using the .NET RabbitMQ library: A worker thread picks
I have finished installing RabbitMQ using the following RPM http://www.rabbitmq.com/releases/rabbitmq-server/v2.7.1/rabbitmq-server-2.7.1-1.noarch.rpm i installed it like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.