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
0
votes
1 answer

RabbitMQ routing behavior

I'm trying to publish message to 2 different queueus via RabbitMQ, but things do not behave as what I expected, here is the detail: I have an exchange: amq.fanout, type: fanout, and the bindings are Queue: Q1, Routing key: key1, and Queue: Q2,…
Edgar
  • 273
  • 1
  • 3
  • 12
0
votes
1 answer

Exchange not getting created automatically when using multiple rabbitTemplate using spring for RabbitMQ

I was using CachingConnectionFactory and making it a bean so that the queues and the exchanges will be created automatically if they don't exist. I created another bean RabbitTemplate and inside it I set an exchange. @Bean public RabbitTemplate…
user3344591
  • 567
  • 5
  • 21
0
votes
1 answer

RabbitMQ - Manually putting a producer in flow control

In one of our applications the back pressure did not work and there was a huge pileup in a queue on RabbitMQ. This caused the RMQ node to choke. Is there a way to apply flow control (manually) on that queue in such cases? That would have slowed down…
anindyaju99
  • 465
  • 1
  • 5
  • 16
0
votes
1 answer

It is safe to use "." has MQTT topic level separator instead of "/"?

The are several devices connected to RabbitMQ using MQTT protocol and there are many nodejs process subscribed with AMPQ protocol to RabbitMQ to fetch data from those devices. The devices are publishing with topics structured like this:…
Alessio Dal Bianco
  • 930
  • 1
  • 11
  • 20
0
votes
0 answers

RabbitMQ connectivity with Load Balancer(Tomcat)

I have a cluster of RabbitMQ servers(typically 2). How could i load balance between the cluster. Does TOMCAT provide any server for this? or what would be the best LoadBalancer here?
Dileephell
  • 620
  • 2
  • 7
  • 18
0
votes
1 answer

RabbitMQ Consumer not receiving messages sent from Producer

Hi I am trying to send a message over rabbitMQ. I am declaring a direct exchange and routing it to my queue at Producer end but i am not able to receive the message at my consumer. Following is the code for my consumer: package…
Aryan Singh
  • 87
  • 2
  • 12
0
votes
1 answer

How to switch back to old cluster in rabbitmq incase of the system or hostname changes?

Due to some problems we changed server name and after doing this we restarted server. We found that rabbitmq service stopped and we started rabbitmq service but we lost total data related to rabbitmq and it is looking like we setup new one and…
0
votes
1 answer

How do I group consumers in RabbitMQ?

We are writing mail sync system, and we use RabbitMQ for that. Every producer pushes mails ids, then consumer gets ids and insert mails to db. In situation when we have 100 consumers (for example) and producers will generate ids too fast, every…
0
votes
1 answer

Load balancing options with rabbit mq

What are the options available with rabbitMQ for load balancing. I have already gone throght the article http://insidethecpu.com/2014/11/17/load-balancing-a-rabbitmq-cluster/ . Is there any alternative way that can be done? We have only single queue…
Shivang MIttal
  • 990
  • 1
  • 14
  • 36
0
votes
1 answer

Notified when an exchange is added/removed from RabbitMQ?

Is it possible to somehow be notified when exchanges are added and removed from RabbitMQ? I'd like to have a "client" on a remote machine that is interested in knowing this, preferably without using polling. The reason for this would be to subscribe…
Johan
  • 37,479
  • 32
  • 149
  • 237
0
votes
2 answers

Dynamic SendTo annotation

I have Java code as following to receive messages form a queue, process it and write processed message to another queue. @RabbitListener(queues = "rawFusion") @SendTo("Fusion") public String receiverFusion(Object _message) { …
0
votes
1 answer

RabbitMQ CLI status different from management portal

I've noticed that when I run the RabbitMQ status command from the command line (rabbitmqctl status), all of the reported numbers are way out of whack with what I know to be reality. My reality is confirmed by what I see in the Management web portal.…
Josh Kitchens
  • 1,080
  • 11
  • 18
0
votes
2 answers

RabbitMQ Consumer Design for Multiple Exchange-Queue Model

I have a RabbitMQ setup with following configuration. each Exchange is FANOUT type Multiple Queue attached to each Exchange. BlockingConnection is made by consumer. Single Consumer to handle all callbacks. Problem - Some payload take longer time…
shubham
  • 547
  • 2
  • 6
  • 20
0
votes
2 answers

RabbitMQ Message Exchange

I have Created a RabbitMQ Producer and a RabbitMQ Consumer.... suppose my producer produces 10 messages. How can i get a particular message from those 10 messages. I want to know how can i uniquely identify a message and read that or consume that…
Jigar Sheth
  • 586
  • 2
  • 5
  • 21
0
votes
1 answer

Losing messages when using RabbitMQ with Logstash

I have just installed RabbitMQ, I'm using it with logstash. I have been sending messages but I lose a lot of data. I have no idea how could I solve it. I'm using the default configuration in rabbitMQ. These are the output in logstash and the input…