如何设置Rabbitmq中消息的基本消息属性?
我正在使用 Rabbitmq Java 客户端 API。我想设置消息的基本属性,并获取消息的消息 ID。如果可能,请提供一些代码来理解这些内容。
谢谢
i am using Rabbitmq Java client API.i want to set the Basic Properties for message and also get the message Id of the message.if possible please provide some code to understand the things.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
通过java客户端发送消息时,通常会发布到这样的通道
,在这里您可以设置消息属性
您可以使用传递代理获取消息
你必须首先像这样绑定队列
然后使用delivery来获取msg
While sending a message through java client usually it is publish to a channel like
Here you can set message properties
You can get the msg by using a delivery agent
You have to first bind the queue like this
Then use delivey to get msg
具体方法如下:
Here is how it can be done: