Questions tagged [rabbitmq-exchange]

In RabbitMQ, messages are not published directly to a queue. Instead, the producer sends messages to an exchange. Use this tag only if your question is about the RabbitMQ Exchanges, or if the question revolves around the routing keys or message queues to which the exchange delivers the message for end publishing.

RabbitMQ is a message broker based on the AMPQ protocol.

Exchanges are AMQP entities where messages are sent. Exchanges take a message and route it into zero or more queues. The routing algorithm used depends on the exchange type and rules called bindings. AMQP 0-9-1 brokers provide four exchange types:

  • Direct exchange: (empty string) and amq.direct
  • Fanout exchange: amq.fanout
  • Topic exchange: amq.topic
  • Headers exchange: amq.match (and amq.headers in RabbitMQ)

Besides the exchange type, exchanges are declared with a number of attributes, the most important of which are:

  • Name
  • Durability (exchanges survive broker restart)
  • Auto-delete (exchange is deleted when all queues have finished using it)
  • Arguments (these are broker-dependent)

Exchanges can be durable or transient. Durable exchanges survive broker restart, whereas transient exchanges do not (they have to be redeclared when the broker comes back online). Not all scenarios and use cases require exchanges to be durable.

RabbitMQ is open source message broker software (sometimes called message-oriented middleware) that implements the Advanced Message Queuing Protocol (AMQP). The RabbitMQ server is written in the Erlang programming language and is built on the Open Telecom Platform framework for clustering and failover. Client libraries to interface with the broker are available for all major programming languages.

419 questions
2
votes
1 answer

Insert message to specific queue in RabbitMQ

I'm new to RabbitMQ and trying it out. In my RabbitMQ server, I have set up an Exchange (TestExch) and I've created 2 queues (TestQ and NewQ). I than created bindings from TestExch to the queues with a routing keys (Q1 and Q2). This is mt c# code…
developer82
  • 13,237
  • 21
  • 88
  • 153
2
votes
2 answers

Expired Message Delivery Sequence RabbitMQ

We are building a solution in which we are publishing message to a time-out queue. After TTL expiry messages are pushed to main queue for re-processing. We are setting up counter value so that messages will be tried for x no. of times for the…
user2775185
  • 1,099
  • 3
  • 17
  • 30
2
votes
2 answers

Topic exchange ambiguity with RabbitMQ

I'm a little confused. I'm trying to implement topic exchanges and am not sure what is needed. I want to have several routing keys and 1 topic exchange (the default amq.topic). My keys would be…
Gerben Jacobs
  • 4,515
  • 3
  • 34
  • 56
2
votes
1 answer

RabbitMQ, topic exchange

I have a Topic Exchange on my RabbitMQ. An error by sending a message. EXCHANGE_NAME = "EX_TEST"; Receive Section: ConnectionFactory connectionFactory = new ConnectionFactory(); connectionFactory.setHost(mServer); mConnection =…
2
votes
3 answers

Rabbitmq binding exchange to exchange

I'm looking for a way to secure my websites messaging system so that users only get data they should have access to. With this in mind, I thought of a system where I have a master topic exchange which my server will send all messages to. The web…
AlexLordThorsen
  • 8,057
  • 5
  • 48
  • 103
1
vote
0 answers

"Feature flags: `classic_mirrored_queue_version`: required feature flag not enabled! It must" error when starting RMQ server in Ubuntu

I am following https://www.rabbitmq.com/install-debian.html#apt-quick-start-cloudsmith this section to install RMQ on ubuntu but I am unable to start the rmq-server. I get the following error. I didn't add source list file as I think it is extra. i…
1
vote
1 answer

Console.WriteLine is not working on consumer.received - RabbitMQ C#

I wrote these code lines, but I couldn't figure out how I can print some values on console in consumer.receive. This code is working because I checked some values on RabbitMQ CloudAMQP, but I cannot see any changes on console. Problem is…
Duhan Uzun
  • 17
  • 4
1
vote
0 answers

How to solve "PRECONDITION_FAILED - delivery acknowledgement on channel 1 timed out. " error in rabbitmq javascript?

After 30 minute I get this error: Channel closed by server: 406 (PRECONDITION-FAILED) with message "PRECONDITION_FAILED - delivery acknowledgement on channel 1 timed out. Timeout value used: 1800000 ms. This timeout value can be configured, see…
FaFa
  • 358
  • 2
  • 16
1
vote
1 answer

RabbitMQ: fanout exchange with no message loss?

RabbitMQ: version 3.11.2 I wish to configure a fanout exchange for which there will be two consumers and a single producer. Each of the two consumers can go offline for several minutes at a time; in the worst case scenario, one of the consumers…
Kode Charlie
  • 1,297
  • 16
  • 32
1
vote
0 answers

need a fluentd sample to collect data from a url and send it to a rabbitmq container

Im new to fluentd, im having a fluentd container with fluent.conf @type http port 9090 bind my-ip-addr tag api @type rabbitmq host rabbitmq port 5672 user guest password guest vhost / exchange…
1
vote
0 answers

#method(reply-code=406, reply-text=PRECONDITION_FAILED - delivery acknowledgement on channel 8 timed out

I have searched a few on the internet, but have not found anything for me hence posting here. The error message "#method(reply-code=406, reply-text=PRECONDITION_FAILED - delivery acknowledgement on channel 8 timed out" is well…
JDGuide
  • 6,239
  • 12
  • 46
  • 64
1
vote
0 answers

Can I create multiple queues of same type in RabbitMQ in a way that publishing message on channel is not duplicated on other queue of same type?

I am looking for two queues with same binding key , but not getting duplicate messages (i.e. the message goes to any one queue, but not both). Ultimate goal of not duplicating messages is to achieve the load balancing such that if queue one has…
Osman
  • 11
  • 1
1
vote
1 answer

RabbitMQ direct exchange is not consuming messages

edit: edited to make it more generalized I have a producer thread wanting to send a message to the consumer threads in Java using RabbitMQ direct exchange, but my consumer are not receiving the dish. Below is the method my producer uses to publish…
1
vote
1 answer

RabbitMQ Access refused in Spring

I'm trying to bind a new queue to an existing exchange but I'm dealing with this error and I don't know what's the issue. I have to say that before trying to create a new queue I was able to do it in the past using this same code but now something…
DiegoMG
  • 383
  • 1
  • 4
  • 18
1
vote
2 answers

How to have more than 50 000 messages in a RabbitMQ Queue

We have currently using a service bus in Azure and for various reasons, we are switching to RabbitMQ. Under heavy load, and when specific tasks on backend are having problem, one of our queues can have up to 1 million messages waiting to be…
CloudAnywhere
  • 669
  • 1
  • 11
  • 27