Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

headercontent-typesymbol 

message property

   

content type

short-string

see table for content conversion belowYTODO

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

typeshort-stringMCE is thrown on subject length > 255Y
propertiessubjectstringpublish propertyrouting-keyshort-stringMCE is thrown on subject length > 255Y

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
else if 'to' contains "/" split on first "/" and set exchange to first and routingKey to second part
else if 'to' refers to an existing queue set exchange to the empty string and routingKey to the queue name
else assume 'to' refers to an exchange and set it and set the routingKey to the empty string

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/propertiesttl /absolute-expiry-timemilliseconds/ulongdelivery-propertiesexpirationdatetime Y

message-annotations

x-opt-jms-msg-type

byte

message-properties

content-type

str8see table for content conversion belowY

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

propertiessubjectstringmessage-propertiesheaders['x-jms-type'] str16if 'x-jms-type' is already in the application-properties it will not be overriddenY
propertiessubjectstringdelivery-propertiesrouting-keystr8Throw MCE if conversion to str8 failsY

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
else if 'to' contains "/" split on first "/" and set exchange to first and routingKey to second part
else if 'to' refers to an existing queue set exchange to the empty string and routingKey to the queue name
else assume 'to' refers to an exchange and set it and set the routingKey to the empty string

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

headerdelivery-count delivery-propertiesredelivered  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 MessageAMQP 0-8 x Message
body sectionbody data typeannotation x-opt-jms-msg-typecontent-typecontent typecomments
amqp-value



nullanyanytext/plain 
stringanyanytext/plain 
mapanyanyjms/map-message or amqp/mapif 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
listanyanyjms/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
otheranyany MessageConversionException is thrown
amqp-sequencesee commentsanyany

jms/stream-message
or amqp/list

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)anyapplication/octet-stream 
1 (ObjectMessage)anyapplication/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)anyapplication/octet-stream 
4 (StreamMessage)anyjms/stream-message or  amqp/list or application/octet-streamThe content types jms/stream-message or  amqp/list are preserved. Otherwise, application/octet-stream
5 (TextMessage)anytext/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/mapjms/map-message or amqp/mapthe content type is preserved on converted message
jms/stream-message or amqp/listjms/stream-message or amqp/listthe content type is preserved on converted message
application/x-java-serialized-object or application/java-object-streamapplication/java-object-stream 
other or not setapplication/octet-stream 
no body







N/A







0 (Message)anytext/plainempty body
1 (ObjectMessage)anyapplication/java-object-streambody will contain serialized null
2 (MapMessage)anyjms/map-messagebody will contain a serialized empty map
3 (BytesMessage)anyapplication/octet-streamempty body
4 (StreamMessage)anyjms/stream-messageempty body
5 (TextMessage)anytext/plainempty body
other or not setcontent types listed in section 3.3.7 (Body Sections) of AMQP JMS Mapping specification (WD9)text/plainempty body
jms/map-message or amqp/mapjms/map-messagebody will contain a serialized empty map
jms/stream-message or amqp/listjms/stream-messageempty body
application/x-java-serialized-object or application/java-object-streamapplication/java-object-streambody will contain serialized null
othertext/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

...