In AMQP 0.9 (rabbitmq) what are the app_id and cluster_id fields for

筅森魡賤 提交于 2019-12-11 08:14:40

问题


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

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)

(This in relation to my other question AMQP (rabbitmq) identify origin of bad message)


回答1:


The best answer I have so far comes from:

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

Where it says:

<!--  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"/>

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.



来源:https://stackoverflow.com/questions/53518633/in-amqp-0-9-rabbitmq-what-are-the-app-id-and-cluster-id-fields-for

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!