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

Unable to connect to RabbitMQ broker using amqps

Hi I would like to use amqps to connect to the rabbitmq broker, but it do not seem to be working. ConnectionFactory cf = new ConnectionFactory(); Uri uri = new Uri("amqps://localhost:5671"); cf.Uri = uri; I had already enabled the plugin…
xXSnowBunny
  • 81
  • 1
  • 6
0
votes
0 answers

can't configure RabbitMQ , We are in process of deploying Rabbitmq clustering in our windows environment

i am fresh towards MQ’s, We are in process of deploying Rabbitmq clustering in our windows environment. Can you please advise if its recommended to work with windows environment for RMQ?
0
votes
1 answer

How to consume from queues with custom names (defined on a fly) with RabbitMQ

I have tasks with an ids, and each task has some amount of jobs to do: every job for each user; for each task, number of users and jobs are different. And I want to put all the jobs to one queue with name task{id}, so I can control when the task…
Sergey Nikolaev
  • 685
  • 1
  • 6
  • 16
0
votes
1 answer

How / When to remove queues in RabbitMQ .net Client

Working with .net rabbitmq client (https://www.rabbitmq.com/dotnet.html). Created a library that other projects can reference to subscribe/unsubscribe/publish messages on the bus. Based on the info provided here and here, in order to have each…
ShaneKm
  • 20,823
  • 43
  • 167
  • 296
0
votes
1 answer

1 request exchange, 1 reply exchange, N number responses

I want to push out 1 response and wait X milliseconds for N responses based on a correlation ID in the headers. Current code is pretty simple: Send a call then start polling indiscriminately. That works ... for one call. I know there is talk of a…
Joe
  • 1
  • 1
  • 3
0
votes
0 answers

RabbitMQ Hold the queue

I want to hold the rabbitMQ queue and then combine the previous transactions of the queue which were paused. Suppose I have a limit that after only 5 transactions I will proceed. I want to combine these 5 transactions and acknowledge the channel…
yash vadhvani
  • 329
  • 2
  • 12
0
votes
1 answer

RabbitMQ for chat channel-multicasting

Let‘s assume I have a simple chat application where some clients can post messages to some channel X and some clients want to subscribe to all messages in X (channel-based multicasting). Would I create a Fanout Exchange for each channel or is there…
user3612643
  • 5,096
  • 7
  • 34
  • 55
0
votes
1 answer

RabbitMQ Exchange guarantees

I have tried to understand the RabbitMQ guarantees on publishing - so far without success - and I would like to know if someone can help me with this scenario: Bindings Exchange A -> Exchange B Exchange A -> Exchange C Exchange B -> Queue…
StefanE
  • 817
  • 6
  • 20
0
votes
0 answers

Design routing of messages in RabbitMQ

I want to design a rounding policy for several components: // | exchange | type | routing key | queue | // |--------------|-------|----------------------------|------------------------------| …
Peter Penzov
  • 1,126
  • 134
  • 430
  • 808
0
votes
0 answers

rabbitmq Emergency - how to save data when CPU is at 100% and the queue keeps growing

I have production rabbitmq running for a long time The queues are simple. no routing or logic. One of the queues got high number of entries (200K) and it caused the CPU to go 100% now the queues became slow for extraction so they keep filling up…
Nir
  • 24,619
  • 25
  • 81
  • 117
0
votes
0 answers

RabbitMQ Configuration - Delay and Error Queue using counter

I'm trying to configure the RabbitMQ I don't know if is possible or if there is a better solution. I am working with a java client and I want, after a AmqpRejectAndDontRequeueException, the RabbitMQ redirect the message to another queue and wait for…
ehh
  • 1,659
  • 2
  • 13
  • 11
0
votes
3 answers

RabbitMQ DefaultConsumer causing too many consumer tags

I have a RabbitMQ client application that listens to a specific queue. The client creates and instance of DefaultConsumer and implements the handleDelivery method. Here is the code protected LinkedBlockingQueue messages = new…
guru
  • 118
  • 2
  • 13
0
votes
1 answer

RabbitMQ - publish to Queue or Exchange

I'm a bit confused about RabbitMQ best practices regarding the use of Queues and Exchanges. Let's say I would like to deliver a GenerateInvoice message with some data for an invoice, and have multiple consumers processing the invoice data and…
dhrm
  • 14,335
  • 34
  • 117
  • 183
0
votes
1 answer

Should I create some exchanges Rabbit MQ?

My use case is following: I have several users, that subscribed on countries, other words, one user can be related to some countries. So, producer sends message for country USA, it means that subscribed users on USA should recieve this message. Like…
POV
  • 11,293
  • 34
  • 107
  • 201
0
votes
1 answer

How to use exchangeArgsConfigurer in rabbitmq in Camel?

I am using alternate exchange in the RabbitMQ. And coding language in Java Camel framework. I wanted to know who to use the exchangeArgsConfigurer in the RabbitMQ URL. As we don't have the proper documentation on camel website.…