Azure 事件中心中的 AMQP 错误AMQP errors in Azure Event Hubs

本文提供了将 AMQP 与 Azure 事件中心一起使用时收到的一些错误。This article provides some of the errors you receive when using AMQP with Azure Event Hubs. 这些错误都是服务的标准行为。They are all standard behaviors of the service. 可以通过在连接/链路上发出发送/接收调用来避免这些错误,这会自动重新创建连接/链路。You can avoid them by making send/receive calls on the connection/link, which automatically recreates the connection/link.

当 AMQP 连接和链接处于活动状态,但 30 分钟内没有使用该链接发出调用(例如发送或接收)时,将出现以下错误。You see the following error when the AMQP connection and link are active but no calls (for example, send or receive) are made using the link for 30 minutes. 因此,该链路将关闭。So, the link is closed. 连接仍处于打开状态。The connection is still open.

“AMQP:link: detach-forced: 由于发布服务器(link164614)中出现错误,因此中转站强制拆离了链接 'G2:7223832:user.tenant0.cud_00000000000-0000-0000-0000-00000000000000'。" AMQP:link: detach-forced: The link 'G2:7223832:user.tenant0.cud_00000000000-0000-0000-0000-00000000000000' is force detached by the broker because of errors occurred in publisher(link164614). 拆离源: AmqpMessagePublisher.IdleTimerExpired: 空闲超时: 00:30:00。Detach origin: AmqpMessagePublisher.IdleTimerExpired: Idle timeout: 00:30:00. TrackingId:00000000000000000000000000000000000000_G2_B3, SystemTracker:mynamespace:主题:MyTopic, 时间戳: 2018/2/16 11:10:40 PM”TrackingId:00000000000000000000000000000000000000_G2_B3, SystemTracker:mynamespace:Topic:MyTopic, Timestamp: 2/16/2018 11:10:40 PM "

连接已关闭Connection is closed

由于没有活动(空闲)并且未在 5 分钟内创建新链接,当连接中的所有链接都已关闭时,AMQP 连接上会出现以下错误。You see the following error on the AMQP connection when all links in the connection have been closed because there was no activity (idle) and a new link hasn't been created in 5 minutes.

“Error{condition=amqp:connection:forced, description='连接处于非活动状态的时间超过了允许的 300000 毫秒,该连接被容器 'LinkTracker' 关闭。" Error{condition=amqp:connection:forced, description='The connection was inactive for more than the allowed 300000 milliseconds and is closed by container 'LinkTracker'. TrackingId:00000000000000000000000000000000000_G21, SystemTracker:gateway5, 时间戳:2019-03-06T17:32:00', info=null}”TrackingId:00000000000000000000000000000000000_G21, SystemTracker:gateway5, Timestamp:2019-03-06T17:32:00', info=null} "

如果创建了新的 AMQP 连接,但在 AMQP 连接创建后的 1 分钟内未创建链接,则会出现此错误。You see this error when a new AMQP connection is created but a link isn't created within 1 minute of the creation of the AMQP Connection.

“Error{condition=amqp:connection:forced, description='连接处于非活动状态的时间超过了允许的 60000 毫秒,该连接被容器 'LinkTracker' 关闭。" Error{condition=amqp:connection:forced, description='The connection was inactive for more than the allowed 60000 milliseconds and is closed by container 'LinkTracker'. TrackingId:0000000000000000000000000000000000000_G21, SystemTracker:gateway5, 时间戳:2019-03-06T18:41:51', info=null}”TrackingId:0000000000000000000000000000000000000_G21, SystemTracker:gateway5, Timestamp:2019-03-06T18:41:51', info=null} "

后续步骤Next steps

若要详细了解 AMQP,请参阅 AMQP 1.0 协议指南To learn more about AMQP, see AMQP 1.0 protocol guide.