stomp-js / ng2-stompjs

Angular 6 and 7 - Stomp service over Websockets
https://stomp-js.github.io/
Apache License 2.0
182 stars 32 forks source link

Integrate with RabbitMQ broker #138

Closed swapnilanar closed 5 years ago

swapnilanar commented 5 years ago

I am trying to publish and subscribe using RabbitMQ server, I have already configured my rabbitmq server to support stomp, somehow I am not able to create queue and publish/subscribe to it.

kum-deepak commented 5 years ago

Did you enable rabbitmq_web_stomp plugin as well?

If you have done that then try the tutorial (https://stomp-js.github.io/guide/ng2-stompjs/2018/11/04/ng2-stomp-with-angular7.html) and sample (https://github.com/stomp-js/ng2-stompjs-angular7).

Let me know if you still face issues.

swapnilanar commented 5 years ago

Did you enable rabbitmq_web_stomp plugin as well?

If you have done that then try the tutorial (https://stomp-js.github.io/guide/ng2-stompjs/2018/11/04/ng2-stomp-with-angular7.html) and sample (https://github.com/stomp-js/ng2-stompjs-angular7).

Let me know if you still face issues.

Thanks,, I updated with the tutorial

swapnilanar commented 5 years ago

@kum-deepak , I am able to publish and subscribe message to queue. I wanted to publish this message to multiple clients From what I read on rabbitmq documentation I think that we will need to publish message to fanout exchange. How we could configure ng2-stomp to use fanout-exchange?

kum-deepak commented 5 years ago

If you are new to RabbitMQ, https://www.rabbitmq.com/getstarted.html is highly recommended.

The pattern you are looking for can be implemented as fanout or topic (https://www.rabbitmq.com/stomp.html#d.td) exchanges. In case of fanout exchange, you would need to pre-declare the exchange before you can use it from STOMP. See https://www.rabbitmq.com/stomp.html#d to understand mapping between AMQP exchange/queue names and STOMP destinations.