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
1
vote
2 answers

Dead-letterred messages not getting requeue to original queue after ttl

I have planned to delay the processing of messages in queue by following these two links link1 link2. So, as suggested in the link. I have declared the original queue with the x-dead-letter-exchange and x-dead-letter-routing-key args. Which…
Naresh
  • 5,073
  • 12
  • 67
  • 124
1
vote
1 answer

RabbitMQ, How to drop a message after n re-queuing attempt

I am trying to build a sort of asynchronous server by using RabbitMQ along with JAVA. I have two exchanges Original_Exch and Dead_Exch, and one queue in each. Both the exchanges are declared DLX (dead letter exchange of each other's queue). Now come…
1
vote
1 answer

RabbitMQ filter user access with ldap plugin

I currently have the ldap plugin working in Rabbit where it will log in any user in my domain. Which is the problem, it's doing it for EVERY user. I want to be able to restrict rabbitmq management portal access to 1 or 2 specific groups in AD. And…
denux
  • 73
  • 2
  • 11
1
vote
1 answer

RabbitMQ routing key does not route

i'm trying to do a simple message queue with RabitMQ i push a message with create_message and then trying to get the message by the routing key. it works great when the routing key is the same. the problem is when the routing key is different i…
meir dahan
  • 103
  • 6
1
vote
1 answer

Increase throughput of my Rabbitmq by overcoming "Throughput and CPU utilization may worsen" warning

I have applied some of the configuration on rabbitmq.config file which are as below: { [ %% The following example sets TCP buffers to 192 KiB. %% https://www.rabbitmq.com/configure.html#configuration-file {rabbit, [ %%…
Jagrut Dalwadi
  • 295
  • 1
  • 4
  • 17
1
vote
1 answer

Publish command result of command handler through ConsumeContext --Masstransit

I have configured a webapi controller for masstransit . something like this . _busControl = MassTransit.Bus.Factory.CreateUsingRabbitMq(x => { x.Host(new Uri("rabbitmq://localhost/"), h =>{ }); }); …
Joy
  • 6,438
  • 8
  • 44
  • 75
1
vote
1 answer

Using a topic Exchange, how do we prevent the Publisher from receiving the message sent by publisher?

I think this is a fairly common problem. I'm using C# and Rabbit MQ client. I have a publisher sending a message to an exchange. The publisher queue and subscriber queues are all bound to the exchange via a routing key. When the publisher sends a…
1
vote
3 answers

Rabbitmq - how to listen to messages on an exchange

I have a program in Java that sends messages to RabbitMQ. All I know is the exchange name. No queues, bindings, and so on. My question is this: how can I see if the program sends these successfully, knowing only the exchange…
Serban Stoenescu
  • 3,136
  • 3
  • 22
  • 41
1
vote
2 answers

How do I configure rabbitmq queue via puppet

I'm trying to install rabbitmq via puppet. I'm using the puppetlabs-rabbitmq module. It also has section to configure queues and exchanges, which are Native Types. I can't figure out how to use these native types. My code for rabbitmq…
sumid
  • 1,871
  • 2
  • 25
  • 37
1
vote
1 answer

getReplyQueue method in java rabbitmq client v3.4.3 no longer available?

I'm using Rabbitmq client v3.3.4 & it had getReplyQueue() method which I was using it to consume messages as below: getChannel().basicConsume(getReplyQueue(), true, consumer); Now, I upgraded my rabbitmq server to 3.4.3 & so I decided to upgrade…
1
vote
1 answer

Delete RabbitMQ Queue when Application is closed abnormally

I am using .NET RabbitMQ Client library. I want to develop a messaging system. For this, I have implemented all necessary methods of RabbitMQ. Moreover I have developed dispose() for deleting queue. I am calling this method in FormClosing event so…
Pritam
  • 685
  • 1
  • 14
  • 29
1
vote
1 answer

RabbitMQ RPC with exchanges trouble

so I have been following this tutorial: http://www.rabbitmq.com/tutorials/tutorial-six-java.html, but I cant get it to work with a direct exchange. Can someone help me out please by modifying the code so that it works with a direct exchange. My…
1
vote
2 answers

How to delete a RabbitMQ exchange?

This seems like a very basic operation but I cannot find a way to delete a named exchange in RabbitMQ. I'm running it on Windows and using the command line tools. At this point I would settle for a .NET API call to delete an exchange, if there…
Anshul
  • 1,302
  • 3
  • 15
  • 36
1
vote
1 answer

Testing RabbitMQ Exchanges

I'm trying to write a application that tests the effect of having N exchanges bound to the same queues on Memory, IO etc. The tests all use a 'Topic' exchange type. The problem I'm having is that when I test with more than 1 exchange, I'm not…
Nick
  • 709
  • 1
  • 6
  • 10
0
votes
0 answers

Rabbit Mq Listner does not work after spring boot 3 upgrade

I am upgrading a component from spring boot 2.6.6 to 3.0.6 ,After upgradation my rabbit listener is not working properly as consumer. When i use it as consumer with spring boot 2.6.6 then it works fine where as with spring boot 3.0.6 it does not…