Windows服务总线错误:Peer没有为链接创建远程端点,目标:,

时间:2017-10-16 11:41:44

标签: java amqp servicebus windows-server

我正在尝试使用the example provided on microsoft website连接到Windows服务总线,尝试使用来自java的AMQP连接服务总线

private String SbConnStrACS = "amqps://" + SbUsername + ":" + encode(SbPassword) + "@" + SbDomain;
private String SbQueueName = SbNamespace + "/testq";

我正在使用以下版本的库

<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>

但我收到错误:

 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)

对于Azure Service总线上的完全相同的错误是remove partitioned flag from the queues,但对于Windows服务总线,我无法找到任何此类标志

我还能尝试什么?

1 个答案:

答案 0 :(得分:0)

注册表中的以下更改解决了问题(感谢Microsoft对此的支持)

  

reg删除HKLM \ SOFTWARE \ Microsoft.NETFramework \ v4.0.30319 / v   SchSendAuxRecord / f

     

reg添加HKLM \ SOFTWARE \ Microsoft.NETFramework \ v4.0.30319 / v   SchSendAuxRecord / t REG_DWORD / d 0x00000000 / f