Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection RabbitMQ through websocket #409

Open
ahsonnenberg opened this issue Sep 14, 2023 · 2 comments
Open

Connection RabbitMQ through websocket #409

ahsonnenberg opened this issue Sep 14, 2023 · 2 comments

Comments

@ahsonnenberg
Copy link

Hello,
would appreciate some help please. I have connected succesfully to RabbitMQ from nodes. Now I am trying to do the same from a browser. However, RabbitMQ closes the connection claiming a bad header ({bad_header,<<"GET / HT">>})

code to connect:
var ws = client.websocket_connect(WebSocket);
var connection = client.connect({"connection_details":ws("ws://localhost:5672", ["binary", "AMQPWSB10", "amqp"])});
connection.open_receiver("demijne");

Am I missing something?
Thanks in advance,
Tonny

@grs
Copy link
Member

grs commented Sep 14, 2023

The server/broker needs to be able to handle a websocket request. I don't believe RabbitMQ will do that on the standard 5672 port. Looking at the supported protocols, they don't mention support for AMQP over websockets at all: https://www.rabbitmq.com/protocols.html

I would check with RabbitMQ team if this is something they support (and if so how to configure)

@ahsonnenberg
Copy link
Author

thank you grs for your quick response.
based on your comment I changed to Apache Artemis, and I now see a connection. thanks a lot.
have a nice day.
Tonny

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants