rabbitmq / rabbitmq-web-stomp

Provides support for STOMP over WebSockets
Other
89 stars 26 forks source link

Support queue naming when subscribing to topics/exchanges #129

Closed dynamed-dev closed 4 years ago

dynamed-dev commented 4 years ago

We need a structure in which it is possible to assign a fixed queue to a client, which is not deleted when the client logs off. The reason is that we have to store persistent messages in this queue until they are picked up by this client.

Such a feature has already been implemented for the rabbitmq-stomp plugin.

https://github.com/rabbitmq/rabbitmq-stomp/issues/43

The goal would be to be able to enter a name for the queue in the subscription options. If this named queue exists, the client could register as a consumer for this queue.

michaelklishin commented 4 years ago

The "feature" you are referring to is used by specifying some relevant STOMP headers. There should be nothing to do on the Web STOMP part. If there is and you have a specific example that we can use to reproduce/understand what's missing, please file a new issue with the details.

michaelklishin commented 4 years ago

Hm, I guess it's a combination of a certain destination type and relevant SUBSCRIBE frame headers. All of which should be available already to your STOMP-over-WebSockets client library.

phil16727 commented 4 years ago

Hi Michael, Well the issue he quoted was that STOMP ignored the Header „x_queue_Name“ this was fixed in 2015. unfortunately stomp over WebSocket is still ignoring x_queue_name in the header field.

michaelklishin commented 4 years ago

This plugin for the most part forwards frames received over WebSockets to a "regular" STOMP connection. It does not process SUBSCRIBE frames directly. You have to back your claims with evidence (a way to reproduce).

phil16727 commented 4 years ago

Hey Michael, Well we where able to „subscribe“ to an Exchange with the type „topic“ so there is no issue with that.

Add the header „auto-delete“:false works as well. Adding x_queue_name“:“mysubsciption-xyz“ won’t work.

In the Moment I was writing i am getting completely insecure if we have maybe missspelled The header instead of x_queue_name we perhaps used x-queue-name. I double check and if this is not the case I post the example.

michaelklishin commented 4 years ago

@phil16727 what leads you to believe that the header name is x_queue_name? STOMP header naming convention closely resembles that of HTTP. What you see suggested by a user in an issue is not necessarily what we end up doing.

The name of the header is x-queue-name as the STOMP guide suggests.

phil16727 commented 4 years ago

Hi @michaelklishin , So nevertheless I will double check on Monday if the spelling is right. If it is, I open up a new issue with a source code example of how we subscribed a the assigned headers.

phil16727 commented 4 years ago

Hi @michaelklishin There was indeed a spelling mistake in the Code. We used _ instead of -. By the way is there somewhere a list of available Headers?

michaelklishin commented 4 years ago

All headers used by the STOMP plugin are mentioned in its respective doc guide.

phil16727 commented 4 years ago

Hi @michaelklishin I wouldn't have asked if I had found it. Any link you can share?

michaelklishin commented 4 years ago

RabbitMQ STOMP plugin.