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
0 answers

Can't publish to rabbitmq default exchange in symfony

When I try to publish a message to rabbitmq default exchange I receive error: "ACCESS_REFUSED - operation not permitted on the default exchange" I use symfony 4.2 php-amqplib/rabbitmq-bundle 1.14 rabbitmq server 3.6.16 Producer config in symfony…
0
votes
1 answer

RabbitMQ java client is not acknowledging the messages

Java Client com.rabbitmq amqp-client 5.17.0 Publisher package com.dsabyte.rabbitmqdemo; import…
Rahul
  • 1,858
  • 1
  • 12
  • 33
0
votes
1 answer

Does consumer and receiver use different protocol to connect to same exchange in RabbitMQ?

I have small query related to exchange in rabbitMQ. Is it possible for different clients to connect with a exchange in RabbitMQ with different protocols. will all the clients able to send or receive events from or to the exchange irrespective of the…
Rohit
  • 406
  • 1
  • 5
  • 21
0
votes
1 answer

RabbitMQ MQTT plugin: messages are not showed in the queue

I'm trying to implement a solution based on a RabbitMQ cluster, composed by 3 nodes, and a HAProxy load balancer which exposes port 1883 in order to receive MQTT connections and redirect them to one of the RabbitMQ nodes following a round robin…
0
votes
0 answers

1 exchange for many queues - create queues only in subscribers?

I've gone through RabbitMQ tutorials and have read a few articles, but it's still not clear to me what are the best practices regarding publishing to an exchange and creating an exchange. My use case is this: We have several REST API's (Node.js) in…
M. Hicks
  • 76
  • 3
  • 7
0
votes
1 answer

Rabbitmq messages not dead-lettered per policy

My setup is as follows: fanout dl exchange (DLX) => dl quorum queue (DLQ) direct exchange (MainX) => quorum queue (MainQ) & routing_key => policy => {x-dead-letter-exchange: DLX, x-overflow: reject-publish-dlx, x-max-length: 10} 1 Consumer client…
asdbabil
  • 91
  • 8
0
votes
0 answers

Cannot connect to RabbitMQ existing queue using Java JMS API

I wanted to connect to RabbitMQ existing queue using Java JMS API. But I am getting below exception when I am trying to connect it. Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; protocol method:…
0
votes
1 answer

What If I produce 3 messages for 3 different queues but consumes only from 2 queues in rabbitmq?

In the following python programme I am configuring RabbitMq. I am creating an exchange named "order" and publishing 3 messages with routing keys "order.notify","order.report","order.test". import pika import json import uuid con =…
0
votes
0 answers

message being consumed even if the consumer is down RabbitMQ

I am writing async communication between services so if one goes down the request can't be stopped so I am doing this scenario I am turning off my consumer and sending message through the producer I get a response that the message has been sent…
0
votes
1 answer

message is not acknowledged but in rabbitmqManagement page it said the queue is empty (but I sent the message)?

When I try to click getMessages button in RabbitMQManagement I get a response which says it is empty, as in the picture belove. However, I send 4 messages which are unacked because I make the acknowledgment manually. If the callback function in my…
FaFa
  • 358
  • 2
  • 16
0
votes
0 answers

RabbitMQ queries were deleted after weeks

We use RabbitMQ 3.10.10 (by Amazon AWS) and created some queues with type "classic", auto delete "no", durability "durable". But all queues were deleted after a few weeks and we don't know why, because auto delete was "no". We use many docker…
0
votes
1 answer

stomp.js cannot receive message sent from pika (RabbitMQ version: 3.11.7)

I have a web page that should receive messages from RabbitMQ using STOMP: