Closed KabDeveloper closed 5 years ago
You cannot consume from a Web MQTT endpoint using this client as it implements a different protocol. I'd recommend putting together an AMQP 0-9-1 and MQTT interop example that does not involve WebSockets first.
RabbitMQ MQTT plugin uses a predeclared topic exchange by default. So can your AMQP 0-9-1 clients. Beware of the topic segment separator differences between the protocols.
HI
I am subscribing to a topic from Javascript using this library: https://www.eclipse.org/paho/clients/js/
Here the code used:
Example taken from here: https://github.com/rabbitmq/rabbitmq-web-mqtt-examples/blob/master/priv/echo.html
And here what I used as code in Golang to publish message to the browser (Same PubSUb example included in your git):
You can notice that when I use: var url = flag.String("url", "amqp://admin:password@127.0.0.1:15675/ws", "AMQP URI")
Instead of: var url = flag.String("url", "amqp://admin:password@127.0.0.1:5672/ws", "AMQP URI")
This error is returned:
The message is received in golang application, but not in the browser from the Javascript example.
Do you have an idea on how to solve this problem and give me another approach if I am doing wrong ?
Thank you