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

Topic based subscribe and publish with EasyNetQ

We have 2 .nwt windows services running and I am currently trying to implement a system where if System 1 is down due to any error, System 2 also has to be brought down. We are making use of RabbitMQ for the same. When SYstem 1 is down, it will…
Minu
  • 232
  • 4
  • 13
0
votes
0 answers

Topic based authorization in RabbitMQ

I am using RabbitMQ using C# client. I want to expose a web api using which external clients can publish in my RabbitMQ. Here I want to setup Topic based authorization like this: If I have three topics configured on my RabbitMQ say Notification, SMS…
Rupendra
  • 608
  • 2
  • 11
  • 42
0
votes
0 answers

How to trigger first update with rabbitMQ using rxJava 2.0?

Is there an elegant way to subscribe to updates only after I trigger first update of my data using rabbitMQ? Or.. Is there a way to know when a new consumer is added and trigger sending the data? For example: Service A is getting updates from…
user1386966
  • 3,302
  • 13
  • 43
  • 72
0
votes
1 answer

How to dynamically route message to queues in RabbitMQ

I want to develop solutions that can dynamically route messages to different queues (more than 10000 queues). That's what I have so far: Exchange with type set to topic. So that I can route messages to different queues based on routing keys. 10000…
Izbassar Tolegen
  • 1,990
  • 2
  • 20
  • 37
0
votes
1 answer

How to get Messages by the consumer according to priority of the messages set by the publishers RabbitMQ

I have publish messages with some priority set for a single consumer(i.e single consumer that may receive messages according to message priority). What i want is to get that messages and print them according to the message priority on the consumer…
0
votes
0 answers

RabbitMQ - Stop publishing and subscribing

We have a system which publishes messages to the RabbitMQ and subscribes from it and each of this is done as Task in C#. Is there any way I could stop the publish and subscribe when some matching criteria is found. Lets say, for example i got an…
Minu
  • 232
  • 4
  • 13
0
votes
0 answers

Rabbitmq: When to use rabbitmq topic based exchange?

We have rabbitmq consumer where we get image urls from where we: download the image through this url. resize the image to our standard aspect ratio upload on our server at the path specified by the client. The input to this consumer is: { …
Sahil Sharma
  • 3,847
  • 6
  • 48
  • 98
0
votes
1 answer

RabbitMQ - How to stop a Publisher Service when Subscriber service fails with some error

I have 2 windows services in C#. Service 1 publishes messages to the RabbitMQ queue. Service 2 subscribes the RabbitMQ queue. Service 2 also connects to a TCP server and sends the messages it has received from RabbitMQ to this server. My question…
Minu
  • 232
  • 4
  • 13
0
votes
1 answer

RabbitMq Direct reply-to aka Fast Rpc with 2 servers

Is it possible to configure 2 Rmq servers in order to use direct reply-to across them? e.g. RpcClient connects Server 1 and makes call to RpcServer, which is connected to Server 2. Is it possible to shovel/federate pseudo queue…
0
votes
1 answer

Implementing Request/Reply Pattern with Spring and RabbitMQ with already existing queues

Let me start by describing the system. There are 2 applications, let's call them Client and Server. There are also 2 queues, request queue and reply queue. The Client publishes to the request queue, and the server listens for that request to…
Brian
  • 168
  • 1
  • 6
0
votes
2 answers

MassTransit consume non MassTransit message

I have a console app that is publishing messages to a RabbitMQ exchange. Is it possible for a subscriber that is built with MassTransit to consume this message? This is the publisher code: public virtual void Send(LogEntryMessage message) …
cksanjose
  • 411
  • 1
  • 4
  • 14
0
votes
1 answer

How to scale up the queue in RabbitMQ dynamically?

can I create queue dynamically using RabbitMQ? In my application, I want the queues to scale up dynamically whenever the queue is full.can I do that with RabbitMQ? Thanks in advance.
0
votes
1 answer

Rabbitmq: How can fifo nature of rabbitmq be maintained with multiple consumers?

We have multiple consumer to handle create/update/delete request of stock. All these request are processed in rabbitmq. The problem is that sometimes when stock is created and gets deleted immediately, the "delete" message is processed first and the…
Sahil Sharma
  • 3,847
  • 6
  • 48
  • 98
0
votes
1 answer

RabbitMQ java client connection to several queues

I am using amqp-client-4.0.2 I have one topic exchange which routes messages to several queues The queues are named in a x.x.x.x convention My java client needs to be able to consume messages from several queues. I would like to be able to do that…
0
votes
1 answer

RabbitMQ - federated queues Vs exchange federation

I have set up a rabbit cluster and I publish messages into a fanout exchange every time something changes in a database. I have dedicated queues bound to this exchange for some of my microservices that consume these updates and I also originally…
Gabe
  • 5,997
  • 5
  • 46
  • 92