-
-
Notifications
You must be signed in to change notification settings - Fork 288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Distinguish between protocol headers and application headers in runtime expressions #556
Comments
Further on the 2 proposed solutions: Solution 1. is simpler but means that the message object can only be used with one specific binding: only in this way Solution 2. is more complex, and requires additional fields that use runtime expressions (such as |
This issue has been automatically marked as stale because it has not had recent activity 😴 |
Yeah, I think it should go inside the bindings object (solution 2). The same protocol header might be different in each protocol. For instance, |
This issue has been automatically marked as stale because it has not had recent activity 😴 It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation. There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model. Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here. Thank you for your patience ❤️ |
Hi @GeraldLoeffler! It has been a while since you created this RFC-0. Do you wanna champion it? |
This issue has been automatically marked as stale because it has not had recent activity 😴 It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation. There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model. Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here. Thank you for your patience ❤️ |
This issue has been automatically marked as stale because it has not had recent activity 😴 It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation. There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model. Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here. Thank you for your patience ❤️ |
I'll use JMS as an example, but the same argument applies to Anypoint MQ and potentially other protocols.
A JMS message defines header, properties, and a body: https://javaee.github.io/javaee-spec/javadocs/javax/jms/Message.html .
JMS uses different API calls to access headers and properties.
JMS headers are equivalent to AsyncAPI protocol headers (i.e., a fixed set of well-known headers defined by the protocol (JMS)).
By contrast, JMS properties are equivalent to AsyncAPI application headers (i.e., headers defined by the message sender to suit its needs).
In AsyncAPI, application headers are specified in the
headers
field of the message object.By contrast, protocol headers are specified in the message binding object, by convention in the
headers
field, as is the case for example in the HTTP bindings.The
correlationId
field of the AsyncAPI message object uses runtime expressions to refer to headers. For example$message.header#/xyz
refers to a header namedxyz
. But runtime expressions do not distinguish between application and protocol headers: both are designated by theheader
keyword in the runtime expression. This means that the runtime expression$message.header#/xyz
cannot be translated into the appropriate JMS API calls without "knowing" thatxyz
is either a protocol header (JMS header) or an application header (JMS property).There are 2 possible solutions:
$message.header.protocol#/xyz
for the former and$message.header#/xyz
for the latter.header
in runtime expressions in message objects to always mean application headers. And introduce runtime expressions to message binding objects (which deal with protocol-specifics) such thatheader
there is defined to always mean protocol headers. For example,$message.header#/xyz
in the message object (for example in thecorrelationId
field) means the application headerxyz
. Conversely,$message.header#/xyz
in the JMS message binding object (for example in acorrelationId
field to be introduced there) means the protocol header (JMS property)xyz
.The text was updated successfully, but these errors were encountered: