light_303
light_303

Reputation: 2111

RabbitMQ - Access /queue or /topic created via STOMP over AMQP

I have a scenario where clients post messages via STOMP to a RabbitMQ /queue or /topic destination.

On the other side i have a server process which connects to RabbitMQ via AMQP. Is it possible to access the "STOMP-channels" from AMQP or are they isolated into their own name space?

it looks like AMQP channels can be accessed from STOMP via /amq/queue/ but i did not find a case for the other direction.

Upvotes: 2

Views: 2431

Answers (1)

light_303
light_303

Reputation: 2111

I found the answer by using the Rabbit web admin and taking a closer look at what the Spring-Stomp over Websocket implementation actually does in the background.

The /topic namespace is implemented by registering an auto-delete queue per connected stomp client which uses a routing key of the topic name on the amq.topic exchange. So to listen to these messages from a non Stomp client you would have to do the same.

The /queue namespace is implemented by creating a (durable) queue and registering a binding from the default empty "" exchange to the queue. To consume messages you can directly consume the queue - and to send messages to the queue you would send a message to the empty exchange with the routing key set to the queue name.

Upvotes: 5

Related Questions