问题
There are several examples of configuring the service bus environment to use http/https with C#, using the call:
ServiceBusEnvironment.SystemConnectivity.Mode = ConnectivityMode.Http;
My question is - can and how do I do this via a java client?
回答1:
The newer versions of the SDK (1.0 and later) do not support HTTP connectivity (AMQP only), and the older ones do not support AMQP (HTTP only). As a result there's no "need" for connectivity mode settings.
The Java SDK is AMQP only.
If http is what you want, try Azure SDK for Java older version, which is http only. It can be found at https://github.com/yvgopal/azure-sdk-for-java/blob/0.9/services/azure-servicebus/pom.xml. Be careful with the version of the package as the new AMQP only SDK also has the same package name. You should be good with any version starting with 0.9, but before 1.0. Also note that the SDKs are completely different. Applications written with one SDk don't work with the other SDK.
https://github.com/Azure/azure-service-bus-java/issues/171
来源:https://stackoverflow.com/questions/44056858/azure-service-bus-access-using-java-sdk-connectivity-mode