问题
I am trying to connect to windows service bus using, the example provided on microsoft website, trying to connect the service bus using AMQP from java
private String SbConnStrACS = "amqps://" + SbUsername + ":" + encode(SbPassword) + "@" + SbDomain;
private String SbQueueName = SbNamespace + "/testq";
I am using below versions of libraries
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jms_1.1_spec</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.apache.qpid</groupId>
<artifactId>qpid-amqp-1-0-client-jms</artifactId>
<version>0.22</version>
</dependency>
but I am getting error:
javax.jms.JMSException: Peer did not create remote endpoint for link, target: sbns/test
at org.apache.qpid.amqp_1_0.jms.impl.MessageProducerImpl.<init>(MessageProducerImpl.java:77)
at org.apache.qpid.amqp_1_0.jms.impl.SessionImpl.createProducer(SessionImpl.java:348)
at org.apache.qpid.amqp_1_0.jms.impl.SessionImpl.createProducer(SessionImpl.java:63)
at test.servicebus.SimpleSenderReceiver.<init>(SimpleSenderReceiver.java:36)
at test.servicebus.Main.main(Main.java:22)
For the exact same error on Azure Service bus is to remove partitioned flag from the queues, but for windows service bus I am not able to find any such flag
What else can I try??
回答1:
Below change in registry resolved the issue (thanks to Microsoft support for this)
reg delete HKLM\SOFTWARE\Microsoft.NETFramework\v4.0.30319 /v SchSendAuxRecord /f
reg add HKLM\SOFTWARE\Microsoft.NETFramework\v4.0.30319 /v SchSendAuxRecord /t REG_DWORD /d 0x00000000 /f
来源:https://stackoverflow.com/questions/46769498/windows-service-bus-error-peer-did-not-create-remote-endpoint-for-link-target