Which are the communication protocols used by RabbitMQ when sending messages from the producer to the RabbitMQ broker and from the broker to the producer? How can I change between them?
Please checkout:
https://www.rabbitmq.com/protocols.html
AMQP
STOMP
MQTT
AMQP 1.0
HTTP
By default it uses AMQP
Related
I successfully completed a POC using Spring Reactor Netty Stomp client (Spring messaging framework) to connect to RabbitMQ on port 61613 (port dedicated for STOMP). That was just a POC. Now I have to build something concrete to be able to deploy in prod environments. I was Googling Spring Messaging vs Spring Integration and stumbled upon Apache Camel.
RabbitMQ component page in the Camel documentation talks about port 5672 and that is AMQP. The STOMP component page talks about ActiveMQ.
I did not see any examples or documentation regarding Camel in conjunction with RabbitMQ and STOMP.
Can Apache Camel be used to connect to RabbitMQ on port 61613?
The Camel documentation for the STOMP component states:
The Stomp component is used for communicating with Stomp compliant message brokers, like Apache ActiveMQ or ActiveMQ Apollo.
Notice that it says like Apache ActiveMQ. It doesn't say it has to be Apache ActiveMQ. It just uses ActiveMQ as an example of a "Stomp compliant" message broker. If RabbitMQ supports STOMP then Camel's STOMP component should work without issue.
Looking at Camel's StompEndpoint it clearly uses the brokerURL from the configuration to make the connection to the Stomp broker. It uses the Fusesource Stomp client implementation which should work with any Stomp compliant broker.
It's also worth noting that Camel is an integration framework and Stomp is a simple, open messaging protocol so it doesn't make much sense for the Stomp component within Camel to only work with a couple of ActiveMQ brokers. It can (and will) work with any Stomp compliant broker (just as the documentation states).
Is it possible to publish/consume messages to ActiveMQ using RabbitMQ libraries and vice versa? Both are AMQP brokers, So I want to check if this is possible or not.
I am asking this question as I have a usecase to migrate our current broker and I dont want my customer to do any changes while consuming messages. This can be any AMQP broker to any other AMQP broker communication
ActiveMQ (both the 5.x and Artemis brokers) support AMQP 1.0. Therefore, any client which communicates over the AMQP 1.0 protocol can interact with the broker regardless of what other brokers that client may be working with.
I run a RabbitMQ node with the MQTT/WebMQTT plugins enabled.
All MQTT plugin settings use the default configuration.
Various MQTT clients are sending messages to MQTT channels.
The MQTT channel names follow the format of devices/{device_id_here}/{special_name_here}
I wish to subscribe to all MQTT messages that would match devices/#/logs in MQTT. How can I accomplish this using an AMQP client on the same broker as the MQTT users?
I am using Bunny as my (Ruby) AMQP client.
You can not use the # wildcard in the middle of a MQTT topic subscription as it is capable of matching multiple levels.
The correct wildcard is + as this only matches a single level in the topic hierarchy. E.g.
device/+/logs
We are using RabbitMQ as message broker. Producer1 connects using AMQP, Producer2 connects using STOMP protocol, Consumer1 connects using AMQP, Consumer2 (using javascript) connects using STOMP via websocket.
(Producer1 and consumer1 uses spring cloud stream)
Test1: When producer1 using AMQP sends messages, it is received in consumer1(AMQP) and failed to receive in consumer2(STOMP). Consumer2 javascript client is getting disconnected immediately when producer1(AMQP) send message and queue is getting deleted.
Test2: When producer2 using STOMP sends message, it is received in consumer1(AMQP) and consumer 2 (STOMP) with out any issue.
Test1 - is it possible scenario? We are trying to connect to same exchange in RabbitMQ using AMQP and STOMP protocol by consumers. STOMP consumer is being disconnected when AMQP producer sends message. Verified both rabbitmq and consumer logs. it didn't give much information in logs.
As STOMP only supports text. Changing the message content type worked.
I am using RabbitMQ as a Stomp broker for Spring Websocket application. The client uses SockJS library to connect to the websocket interface.
Every queue created on the RabbitMQ by the Spring is durable while topics are non durable. Is there any way to make the queues non durable as well?
I do not think I can configure on the application side. I played a bit with RabbitMQ configuration but could not set it up either.
Example destination on RabbitMQ used for SUBSCRIBE and SEND:
services-user-_385b304f-7a8f-4cf4-a0f1-d6ceed6b8c92
It will be possible to specify properties for endpoints as of RabbitMQ 3.6.0 according to comment in RabbitMQ issues - https://github.com/rabbitmq/rabbitmq-stomp/issues/24#issuecomment-137896165:
as of 3.6.0, it will be possible to explicitly define properties for endpoints such as /topic/ and /queue using subscription headers: durable, auto-delete, and exclusive, respectively.
As a workaround you can try to create queues by your own using AMQP protocol and then refer to that queues from STOMP protocol.