gpt4 book ai didi

java - 无法使用 JMS 连接 Azure 服务总线主题 - Java

转载 作者:行者123 更新时间:2023-12-02 23:36:11 25 4
gpt4 key购买 nike

我按照Azure ServiceBus JMS Sample中提到的步骤进行操作具有以下属性

spring.jms.servicebus.connection-string=Endpoint=sb://test-dt.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=key
spring.jms.servicebus.topic-client-id=12345
spring.jms.servicebus.idle-timeout=18000
spring.jms.servicebus.pricing-tier=Standard

但是我收到以下错误

ERROR 43904 --- [ntContainer#0-1] org.apache.qpid.jms.JmsConnection        : Failed to connect to remote at: amqps://test-dt.servicebus.windows.net:-1
ERROR 43904 --- [ntContainer#0-1] o.s.j.l.DefaultMessageListenerContainer : Could not refresh JMS Connection for destination 'test-topic' - retrying using FixedBackOff{interval=5000, currentAttempts=6, maxAttempts=unlimited}. Cause: handshake timed out after 10000ms

另一方面,我按照ServiceBus without JMS中提到的步骤进行操作。并将 TransportType 添加为 AmqpTransportType.AMQP_WEB_SOCKETS 然后我就可以连接了。

我们希望使用 spring boot starter 和监听器方法来实现,而不是从 (public static void main) 方法调用。

请指导我在点击第一个链接时缺少什么

最佳答案

ERROR 43904 --- [ntContainer#0-1] org.apache.qpid.jms.JmsConnection : Failed to connect to remote at: amqps://test-dt.servicebus.windows.net:-1

要解决上述错误,请按照 Anand Sowmithiran 的建议进行尝试:

检查端口5671是否被阻止:

telnet <yournamespacename>.servicebus.windows.net 5671

注意:通过 TCP 使用 AMQP 连接的客户端需要在防火墙中打开端口 56715672。除了这些端口之外,如果 EnableLinkRedirect 可能还需要打开其他端口。功能已启用。

您可以引用Troubleshooting guide for Azure Service Bus , AMQP outbound port requirementsPort 5671 Blocked :(. What are other options?

关于java - 无法使用 JMS 连接 Azure 服务总线主题 - Java,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71953804/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com