...
AMQP 1.0 message | AMQP 0-8...0-9-1 message |
|
|
| Implemented
| |||||
---|---|---|---|---|---|---|---|---|---|---|
Section name | Property name | Type | Properties | Property name | Type | Comments | ||||
header | durable | boolean | message property | delivery mode | unsigned byte |
| Y | |||
header | priority | unsigned byte | message property | priority | unsigned byte |
| Y | |||
header | ttl | milliseconds/uint | message property | expiration | short-string | 'absolute-expiry-time' takes precedence over 'ttl' | Y | |||
properties | absolute-expiry-time | timestamp /ulong | message property | expiration | short-string | 'absolute-expiry-time' takes precedence over 'ttl' | Y | |||
header | delivery-count | uint |
|
|
|
|
| |||
header | first-acquirer | boolean |
|
|
|
|
| |||
message-annotationannotations | x-opt-jms-msg-type | byte | message property | content type | short-string |
| see table for content conversion below | YN | ||
header | content-type | symbol | message property | content type | short-string | see table for content conversion below | YTODO | |||
properties | content-encoding | symbol | message property | encoding | short-string | MCE is thrown on content-encoding length > 255 | Y | |||
properties | message-id | binary, uuid, ulong, string | message property | message id | short-string | if conversion to AMQShortString fails the field is not set. when converting from binary no restrictions are applied to the bytes. May contain invalid UTF-8 and/or zero-bytes. | Y | |||
properties | correlation-id | binary, uuid, ulong, string | message property | correlation id | short-string | if conversion to AMQShortString fails the MCE is thrown. when converting from binary no restrictions are applied to the bytes. May contain invalid UTF-8 and/or zero-bytes. | Y | |||
properties | user-id | binary | message property | user id | short-string | if conversion to AMQShortString fails the field is not set | Y | |||
properties | reply-to | string | message property | reply to | short-string | if conversion to AMQShortString fails the MCE is thrown if global address (starts with '/'), the MCE is thrown | Y | |||
properties | creation-time | timestamp /ulong | message property | timestamp | long | if creation-time is not set arrival time will be used | Y | |||
properties | subject | string | message property | headers['qpid.subject'] | long-string |
| Y | |||
properties | subject | string | message property | type | short-string | MCE is thrown on subject length > 255 | Y | |||
properties | subject | string | publish property | routing-key | short-string | MCE is thrown on subject length > 255 | Y | |||
properties | group-id | string | message property | headers['JMSXGroupID'] | long-string | specified in JMS bindmap | Y | |||
properties | group-sequence | sequence number | message property | headers['JMSXGroupSeq'] | int | specified in JMS bindmap | Y | |||
properties | to | string | basic.publish | exchange, routingKey | short string | if 'to' starts with "/" throw MCE Throw MCE if exchange or routingKey conversion to AMQShortString fails | Y | |||
application-properties | * | * | message property | headers | field-table | If conversion fails a MCE is thrown | Y |
...
AMQP 1.0 message | AMQP 0-10 message | Implemented
| ||||||
---|---|---|---|---|---|---|---|---|
Section name | Property name | Type | Property segment | Property name | type | Comments | ||
header | durable | boolean | delivery-properties | delivery-mode | uint8 |
| Y | |
header | priority | unsigned byte | delivery-properties | priority | uint8 |
| Y | |
header/properties | ttl /absolute-expiry-time | milliseconds/ulong | delivery-properties | ttl | uint64 |
| Y | |
header/properties | ttl /absolute-expiry-time | milliseconds/ulong | delivery-properties | expiration | datetime | Y | ||
message-annotations | x-opt-jms-msg-type | byte | message-properties | content-type | str8 | see table for content conversion below | Y | |
properties | content-type | symbol | message-properties | content-type | str8 |
| see table for content conversion below | YTODO |
properties | content-encoding | symbol | message-properties | content-encoding | str8 | Throw MCE if conversion to str8 fails | Y | |
properties | message-id | binary, uuid, ulong, string | message-properties | message-id | uuid | When converting from string direct conversion to UUID is attempted. If that fails a type 3 UUID is created. When converting from non-UUID a type 3 UUID is created from the source bytes. | Y | |
properties | correlation-id | binary, uuid, ulong, string | message-properties | correlation-id | vbin16 | Throw MCE if conversion to vbin16 fails | Y | |
properties | user-id | binary | message-properties | user-id | vbin16 | if conversion to vbin16 fails do not set this field | Y | |
properties | reply-to | string | message-properties | reply-to | reply-to | Throw MCE if conversion of exchange or routingKey to str8 fails | Partial | |
properties | creation-time | timestamp /ulong | delivery-properties | timestamp | datetime | when creation-time is not set, arrival-time is set as a timestamp | Y | |
properties | subject | string | message-properies | headers['qpid.subject'] | str16 | if 'qpid.subject' is already in the application-properties it will not be overridden | Y | |
properties | subject | string | message-properties | headers['x-jms-type'] | str16 | if 'x-jms-type' is already in the application-properties it will not be overridden | Y | |
properties | subject | string | delivery-properties | routing-key | str8 | Throw MCE if conversion to str8 fails | Y | |
properties | group-id | string | message-properies | headers['JMSXGroupID'] | str16 | if 'JMSXGroupId' is already in the application-properties it will not be overridden | Y | |
properties | group-sequence | sequence number | message properies | headers['JMSXGroupSeq'] | int | if 'JMSXGroupSeq' is already in the application-properties it will not be overridden | Y | |
properties | to | string | delivery-properties | exchange | str8 | if 'to' starts with "/" throw MCE Throw MCE if exchange or routingKey conversion to str8 fails | Y | |
properties | to | string | delivery-properties | routing-key | str8 | see above | Y | |
application-properties | - | map | message-properties | application-headers | map |
| Y | |
content | message-properties | content-length | uint64 |
| Y | |||
header | delivery-count | delivery-properties | redelivered | N |
...
AMQP type | java type | Target mime-type | Comment |
---|---|---|---|
string | String | text/plain | |
list of primitive types (double,float,string,byte[],boolean,byte,short,int,long, char) | java.util.List | jms/stream-message | |
map with primitive value types (double,float,string,byte[],boolean,byte,short,int,long, char) | java.util.Map | jms/map-message | Should null be included into the allowed types? |
list | java.util.List | amqp/list | |
map | java.util.Map | amqp/map | |
binary | java.lang.Serializable | application/java-object-stream | |
binary | byte[] | application/octet-stream |
AMQP 1.0 to AMQP 0-
...
x
AMQP 1.0 Message | AMQP 0-8 x Message | ||||
---|---|---|---|---|---|
body section | body data type | annotation x-opt-jms-msg-type | content-type | content type | comments |
amqp-value | null | any | any | text/plain | |
string | any | any | text/plain | ||
map | any | any | jms/map-message or amqp/map | if keys' length<255 and values of simple types (string, boolean, double, float, binary(byte[]), null, byte, short, integer, long ), the "jms/map-message " format is used. If keys' length<255 but non simple type value is used, than "amqp/map" format is used. Otherwise, MessageConversionException is thrown | |
list | any | any | jms/stream-message or amqp/list | if list items of simple types(string, boolean, double, float, byte[] (Binary), null, byte, short, integer, long ), otherwise conversion to "amqp/list" is attempted, otherwise MessageConversionException is thrown | |
other | any | any | MessageConversionException is thrown | ||
amqp-sequence | see comments | any | any | jms/stream-message | if amqp-sequence section values of simple types(string, boolean, double, float, byte[] (Binary), null, byte, short, integer, long ), otherwise conversion to "amqp/list" is attempted, otherwise MessageConversionException is thrown |
data | binary (bytes[]) | 0 (Message) | any | application/octet-stream | |
1 (ObjectMessage) | any | application/java-object-stream | |||
2 (MapMessage) | any | jms/map-message or amqp/map or application/octet-stream
| The content types jms/map-message and amqp/map are preserved. Otherwise, application/octet-stream | ||
3 (BytesMessage) | any | application/octet-stream | |||
4 (StreamMessage) | any | jms/stream-message or amqp/list or application/octet-stream | The content types jms/stream-message or amqp/list are preserved. Otherwise, application/octet-stream | ||
5 (TextMessage) | any | text/plain | |||
other or not set | content types listed in section 3.3.7 (Body Sections) of AMQP JMS Mapping specification (WD9) | text/plain | |||
jms/map-message or amqp/map | jms/map-message or amqp/map | the content type is preserved on converted message | |||
jms/stream-message or amqp/list | jms/stream-message or amqp/list | the content type is preserved on converted message | |||
application/x-java-serialized-object or application/java-object-stream | application/java-object-stream | ||||
other or not set | application/octet-stream | ||||
no body | N/A | 0 (Message) | any | text/plain | empty body |
1 (ObjectMessage) | any | application/java-object-stream | body will contain serialized null | ||
2 (MapMessage) | any | jms/map-message | body will contain a serialized empty map | ||
3 (BytesMessage) | any | application/octet-stream | empty body | ||
4 (StreamMessage) | any | jms/stream-message | empty body | ||
5 (TextMessage) | any | text/plain | empty body | ||
other or not set | content types listed in section 3.3.7 (Body Sections) of AMQP JMS Mapping specification (WD9) | text/plain | empty body | ||
jms/map-message or amqp/map | jms/map-message | body will contain a serialized empty map | |||
jms/stream-message or amqp/list | jms/stream-message | empty body | |||
application/x-java-serialized-object or application/java-object-stream | application/java-object-stream | body will contain serialized null | |||
other | text/plain | empty body |
AMQP 0-8...0-9-1 to AMQP 1.0
At the moment the conversion into AMQP 1-0 might end-up in unexpected message types, for example, stream message can be received as object message and map message can be received as object message. It seems the same applies to conversion from AMQP 1-0 into AMQP 0-x
Conversion issues
This section summarises existing conversion issues
...