[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [OASIS Issue Tracker] (AMQPBINDMAP-15) update handling of correlation ID for interop
[ https://issues.oasis-open.org/browse/AMQPBINDMAP-15?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62949#comment-62949 ] Robert Gemmell commented on AMQPBINDMAP-15: ------------------------------------------- Here are some examples to aid discussion based on the above suggestion, which I have since implemented. I added "AMQP_NO_PREFIX" for use as an escaping hint that arriving message-id values didnt have the 'ID:' prefix, and used AMQP_UUID, AMQP_ULONG, AMQP_BINARY, and AMQP_STRING escaping hints in similar manner as they were previously. ==== A message arriving with an AMQP message-id, giving a JMSMessageID result: AMQP message-id: string, contains 'ID:' prefix, e.g. "ID:my-string-id": JMSMessageID: "ID:my-string-id" AMQP message-id: string, does not contain 'ID:' prefix, e.g. "my-non-prefixed-string-id" JMSMessageID: "ID:AMQP_NO_PREFIX:my-non-prefixed-string-id" AMQP message-id: UUID JMSMessageID: "ID:AMQP_UUID:<UUID toString>" AMQP message-id: ulong (e.g 42) JMSMessageID: "ID:AMQP_ULONG:42" AMQP message-id: binary (e.g 0xABCDEF) JMSMessageID: "ID:AMQP_BINARY:ABCDEF" AMQP message-id: string, contains 'ID:' prefix, followed by one of the encoding prefixes, e.g. "ID:AMQP_ULONG:my-string-id": JMSMessageID: "ID:AMQP_STRING:ID:AMQP_ULONG:my-string-id" ==== A message sent with the above JMSMessageID values set as their JMSCorrelationID give the reverse mapping to yield the same AMQP correlation-id field value as in the message-id field of the original message. JMSCorrelationID: "ID:my-string-id" AMQP message-id: "ID:my-string-id": JMSCorrelationID: "ID:AMQP_NO_PREFIX:my-non-prefixed-string-id" AMQP message-id: "my-non-prefixed-string-id" JMSCorrelationID: "ID:AMQP_UUID:<UUID toString>" AMQP message-id: UUID JMSCorrelationID: "ID:AMQP_ULONG:42" AMQP message-id: ulong 42 JMSCorrelationID: "ID:AMQP_BINARY:ABCDEF" AMQP message-id: binary 0xABCDEF JMSCorrelationID: "ID:AMQP_STRING:ID:AMQP_ULONG:my-string-id" AMQP message-id: "ID:AMQP_ULONG:my-string-id": ==== A message sent with the following different example JMSCorrelationIDs would give the stated behaviour: JMSCorrelationID string: "application-specific" corellation-id field: "application-specific" JMSCorrelationID string: “AMQP_ULONG:42” corellation-id field: “AMQP_ULONG:42” (string, not ulong) JMSCorrelationID string: “AMQP ULONG:foo” corellation-id field: “AMQP_ULONG:foo” (string, not ulong, obviously) ==== A message arriving with an AMQP correlation-id, giving a JMSCorrelationID result: AMQP correlation-id: string, contains 'ID:' prefix, e.g. "ID:my-string-id": JMSCorrelationID: "ID:my-string-id" AMQP correlation-id: string, does not contain 'ID:' prefix, e.g. "my-non-prefixed-string-id" JMSCorrelationID: "my-non-prefixed-string-id" AMQP correlation-id: UUID JMSCorrelationID: "ID:AMQP_UUID:<UUID toString>" AMQP correlation-id: ulong (e.g 42) JMSCorrelationID: "ID:AMQP_ULONG:42" AMQP correlation-id: binary (e.g 0xABCDEF) JMSCorrelationID: "ID:AMQP_BINARY:ABCDEF" AMQP correlation-id: string, contains 'ID:' prefix, followed by one of the encoding prefixes,e.g. "ID:AMQP_STRING:my-string-id": JMSCorrelationID: "ID:AMQP_STRING:ID:AMQP_STRING:my-string-id" AMQP correlation-id: string, does not contain 'ID:' prefix, starts with one of the encoding prefixes,e.g. "AMQP_ULONG:foo": JMSCorrelationID: "AMQP_ULONG:foo" > update handling of correlation ID for interop > --------------------------------------------- > > Key: AMQPBINDMAP-15 > URL: https://issues.oasis-open.org/browse/AMQPBINDMAP-15 > Project: OASIS Advanced Message Queuing Protocol (AMQP) Bindings and Mappings (AMQP-BINDMAP) TC > Issue Type: Bug > Components: JMS Mapping > Affects Versions: wd06 > Reporter: Steve Huston > Assignee: Robert Gemmell > Priority: Blocker > > An issue with interop between JMS and non-JMS clients when using correlation ID values on messages. > If a JMS application sets JMSCorrelationID on a Message, it can do so either using a JMSMessageID value (a String beginning with "ID:") or an application-specific string value. Previously we decided that the "ID:" prefix of a JMSMessageID should not be sent on the wire so other non-JMS client need not deal with it, and a message-id from a non-JMS client would round-trip correctly as a correlation-id value. For this reason, and also to accomodate the 4 different types of message-id that the core spec defines (string, ulong, uuid, and binary) and ensure preservation of the AMQP wire type when round-tripping these values into the JMS application layer and back to the AMQP layer, the client manages/translates the message-id and correlation-id values, and utilises the x-opt-app-correlation-id message annotation to record when an application-specific JMSCorrelationID value is in use. > An issue arises if an application-specific string is sent as the JMSCorrelationID value on a request message (from JMS app A), and received by a a non-JMS app B which then sends a new reply message containing the same correlation-id value. If the non-JMS client/app B does not set the x-opt-app-correlation-id on its reply message, then the JMS app A receiving the reply message will then treat the correlation-id value as being representative of a JMSMessageID value and return incorrectly return an "ID:" prefixed value for the message JMSCorrelationID. This would then no longer match the JMSCorrelationID sent on the original request message. > Related sections: > 3.2.1.1 JMSMessageID And JMSCorrelationID Handling > 3.2.1 JMS Headers (specifically the JMSMessageID and JMSCorrelationID entries) > 3.3.2 Properties Section ( specifically the message-id and correlation-id entries) > Section references from WD6: https://www.oasis-open.org/committees/document.php?document_id=56418&wg_abbrev=amqp-bindmap -- This message was sent by Atlassian JIRA (v6.2.2#6258)
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]