在AMQP 0.9(rabbitmq)中,app_id和cluster_id字段是什么 [英] In AMQP 0.9 (rabbitmq) what are the app_id and cluster_id fields for

查看:193
本文介绍了在AMQP 0.9(rabbitmq)中,app_id和cluster_id字段是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试了解AMQP消息中的app_id和cluster_id字段. 我什至尝试阅读如下定义的AMQP规范:

I am trying to understand the app_id and cluster_id fields in an AMQP message. I have even tried reading the AMQP specification as defined on:

  • https://www.rabbitmq.com/specification.html and
  • http://www.amqp.org/resources/download

但是尚不清楚app_id和cluster_id字段是什么. 同样在AMQP 1.0中还不清楚(默认情况下不使用RabbitMq)

But it is unclear what the app_id and cluster_id fields are. This remains equally unclear in AMQP 1.0 (which rabbitmq does not use by default)

(这与我的其他问题 AMQP(rabbitmq)确定来源错误消息)

推荐答案

到目前为止,我最好的答案来自:

The best answer I have so far comes from:

https://www.rabbitmq.com/resources/specs/amqp0-9-1.extended.xml

上面写着:

<!--  For application use, no formal behaviour -->
<field name="app-id"     domain="shortstr" label="creating application   id"/>
<!--  Deprecated, was old cluster-id property -->
<field name="reserved" domain="shortstr" label="reserved, must be empty"/>

cluster_id最初用于什么目的(也许可以识别集群?)不再使用.

Whatever the cluster_id was for originally (identifying a cluster perhaps?) it is no longer used.

该评论指出无正式行为",我将其解释为允许标题,但标题完全由实现定义,可以用于任何事物. 假设您还可以使用自定义标头(请参阅此问题例如)烦扰任何标头本身没有明确定义的语义似乎很奇怪(协议设计不好?).

The comment notes "no formal behaviour" which I interpret as meaning that the header is permitted but it is entirely implementation defined and can be used for anything. Given that you can also have custom headers (see this question for example) it seems odd (bad protocol design?) to bother having any headers that do not have well defined semantics of their own.

这篇关于在AMQP 0.9(rabbitmq)中,app_id和cluster_id字段是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆