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, add value that is not exist from a queue

I'm using rabbitTemplate.convertAndSend() for sending my object to queue. the problem is, I need that queue to store unique data. is there any mechanism to check whether such data is exist in a queue, before putting it to said queue?
Rifi331
  • 99
  • 1
  • 1
  • 10
0
votes
2 answers

RabbitMQ exchange bind replicating messages published to one exchange across two other exchanges

I have 3 different exchanges in my rabbitMQ i am trying to route all the messages sent to mainex across the other two exchanges dmyex and monex i tried to use the channel.exchngeBind method to bind the exchanges. I am still not able to see the…
0
votes
1 answer

How to resend messages from X-DEAD-LETTERS queue to another?

Here are my two RabbitMQ queues and the method: private final Queue igListenerQueue; private final Queue igDlxQueue; @WriteOperation public void sendDeadMessages(String serviceName, Integer messageCount) { …
Maksym Rybalkin
  • 453
  • 1
  • 8
  • 22
0
votes
1 answer

I have a RabbitMQ container that has regularly "unexpected_frame" exceptions, what does that mean?

I have an application that is pushing data into RabbitMQ and then some other apps are subscribing to the different exchanges. But recently, I keep having errors like this after a few hours: 2020-07-09 12:45:12.670 [error] <0.23578.1> Error on AMQP…
Thomas
  • 10,933
  • 14
  • 65
  • 136
0
votes
1 answer

No Consumer code executed when publishing via a base class

I have a base class IntegrationEvent and all other business events inherited from that. public abstract class IntegrationEvent { public Guid Id { get; private set; } public DateTimeOffset OccuredOn { get; private set; } …
Saeed Ganji
  • 197
  • 17
0
votes
1 answer

RabbitMQ publisher confirms with topic exchange - BasicAcks only fires once the first time

Using a topic exchange, I would like to have a publish/subscribe messaging pattern with the following features: Have "publisher confirms" implemented. Have the consumer acknowledge each message as well once it has processed it. Use routing keys to…
user1984695
  • 77
  • 1
  • 2
  • 10
0
votes
1 answer

Spring boot rabbitmq no exchange '"xxxxxxx"' in vhost '/'

I'm writing a simple rabbitmq producer with spring boot 2.2.7. On the broker side I've setup a direct exchange samples , a queue named samples.default and binded them together adding a samples.default bindkey key. when running the application I get…
Emmanuel BRUNET
  • 1,286
  • 3
  • 19
  • 46
0
votes
1 answer

Rabbitmq cluster crashing when creating queues

Hello I have a question that affter looking around for about 2 days I was not able to solve, so I will write it here, as clear as possible so it may help others too. The scenario is: We have an application that will handle about 200k devices…
Pato Navarro
  • 262
  • 2
  • 11
0
votes
1 answer

Any reason why RabbitMQ doesn't create exchange on start application?

I have strange RabbitMQ behavior (as for me of course). When I started spring boot web application, in my configuration I'm trying to create rabbit direct exchange: @Bean public DirectExchange exchange() { return new…
0
votes
2 answers

Camel Route Losing Message on restart in camel rabbitmq

I am using camel-rabbitmq. Here is my route defination camelContext.addRoutes(new RouteBuilder() { @Override public void configure() throws Exception { from("rabbitmq:TEST?queue=TEST&concurrentConsumers=5") …
S Shukla
  • 43
  • 8
0
votes
1 answer

RabbitTemplate's setChannelTransacted flag causes message being not delivered to queue

Given I have application with AMQP anonymous queue and fanout exchange: @Bean public Queue cacheUpdateAnonymousQueue() { return new AnonymousQueue(); } public static final String CACHE_UPDATE_FANOUT_EXCHANGE =…
0
votes
1 answer

Rabbit MQ -Message Order Priority Consumption

Using Rabbit MQ Is there a way ,I can ensure all messages of Type A are consumed before messages of Type B. Eg: if I have a pool of Product and Order messages, I want to make sure all Product messages are consumed before Order messages ? As Order…
0
votes
1 answer

RabbitMQ using Direct Exchange when Topic was specified

In my application I have 3 classes: - Company, which hires Workers for any of 3 jobs - Workers, each can do 2 jobs - Administrator, which receives copies of all messages in the program and can send messages to all companies, all workers or just…
qalis
  • 1,314
  • 1
  • 16
  • 44
0
votes
0 answers

Automatic re-declaration/recovery of queue in RabbitMQ

I have RabbitMQ queue consumer application in java. Below is the code snippet for declaring queue: public static void declareQueue(final String rmqQueueName) { try { Map args = new HashMap<>(); …
abn
  • 41
  • 1
  • 8
0
votes
1 answer

How to keep only the last object in a RabbitMQ exchange?

I have a RabbitMQ exchange where I put quotes that change several times per second. When a new message is sent to the exchange, I would like undelivered messages to be dropped and only the last one to be sent. Is this possible? I’m doing this in F#…
Thomas
  • 10,933
  • 14
  • 65
  • 136