I'm trying to connect to an Azure Service bus using amqp-10-jms-spring-boot starter (which I understand to use apache qpid jms under the hood.
When I set the connection string (amqphub.amqp10jms.remote-url) to use 'amqps://' everything works fine, a hello world message is sent to an Azure queue and then retreived & printed by the application.
However when I use an "amqpwss://[Endpoint]:443" connection string I receive an exception...
Caused by: io.netty.handler.codec.http.websocketx.WebSocketHandshakeException: Invalid handshake response getStatus: 400 This service does not support WebSocket connections.
I am skeptical that the Azure Service bus does not support WebSocket connections.
How can I establish an amqpwss connection to an Azure service bus from a Spring Boot Application? (I would like to use qpid but I'm not tied to it).
Sample code here: https://github.com/kevvvvyp/amqp-websocket-apache-qpid
After a support attempt at getting upselled, and looking through the documentation again I've proven once again that microsoft is aggressively interested in embracing and vendor locking people into their garden.
Tirade aside, the URL to connect to websockets endpoint is different compared to regular AMQP endpoint. Suppose you have the following
amqps://[endpoint]
To connect using websockets, you'd replace the protocol with amqpwss and the port with 443
amqpwss://[endpoint]:443
But, what is not mentioned, is that you must also specify a path of /$servicebus/websocket
. As a result, the final url is
amqpwss://[endpoint]:443/$servicebus/websocket
I have no clue how you're supposed to figure this out. Please prove me wrong and point to the bit in documentation that as of 2021-03-18 does contain this bit of information. Regardless, I found it out via this SO question regarding connecting from browser via websockets to azure service bus.