AMQP传输帧被拒绝
我目前正在尝试通过 AMQP 1.0 将我的驱动程序开发为 ActiveMQ 我可以成功打开、开始会话、附加此会话的链接,但我的第一个传输帧因“错误解码”而被拒绝,尽管wireshark将其视为有效帧,如屏幕截图 传输帧的wireshark视图
返回的帧是一个带有错误条件的关闭:amqp:decode-error, 说明无法解码 AMQP 帧:十六进制:...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从我在编码中看到的情况来看,您已经围绕一条指示为 format = 0 的消息创建了一个传输,它需要一个 AmqpValue、N 个 AmqpSequence 部分或 N 个数据部分的正文部分。您的编码似乎将二进制编码为主体部分,这是不正确的,这可能是代理触发异常的地方。
该规范很好地概述了这一要求
http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#section-message-format
From what I can see in the encoding you have created a Transfer around a message indicated to be format = 0 which requires a body section of, one AmqpValue, N AmqpSequence sections or N Data sections. Your encoding seems to encode a Binary as the body section which is incorrect and this is probably where the broker fires off the exception.
The specification outlines this requirement pretty well
http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#section-message-format