Versions Compared

Key

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

...

AMQP 0-10 type

 

Used in JMS ClientsAMQP 0-9-1 types

short-string

long-string

timestamp

field-array

field-table

float

double

decimal

void

boolean

byte

unsigned byte

short

unsigned short

int

unsigned int

long

unsigned long

binary

ascii str

wide str

ascii char

bin8

no

 

 

 

 

 

 

 

 

 

 

 

 

?

 

 

 

 

 

    X

 

 

 

int8

yes

 

 

 

 

 

 

 

 

 

 

X

 

 

 

 

 

 

 

 

 

 

 

uint8

no

 

 

 

 

 

 

 

 

 

 

 

      X

?

 

 

 

 

 

 

 

 

 

char

no ******

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X

boolean

yes

 

 

 

 

 

 

 

 

 

X

 

 

 

 

 

 

 

 

 

 

 

 

bin16

no

 

 

 

 

 

 

 

 

 

 

 

 

 

 

?

 

 

 

   X

 

 

 

int16

yes

 

 

 

 

 

 

 

 

 

 

 

 

X

 

 

 

 

 

 

 

 

 

uint16

no

 

 

 

 

 

 

 

 

 

 

 

 

 

   X

?

 

 

 

 

 

 

 

bin32

no

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

?

 

   X

 

 

 

int32

yes

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X

 

 

 

 

 

 

 

uint32

no

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

    X

?

 

 

 

 

 

float

yes

 

 

 

 

 

X

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

char-utf32

no

 

 X***

 

 

 

 

 

 

 

 

 

 

 

 

?

 

 

 

 

 

 

 

sequence-no

no

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

   X

 

 

 

bin64

no

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

?

 

   X

 

 

 

int64

yes

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X

 

 

 

 

 

uint64

no

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

?

    X

 

 

 

 

double

yes

 

 

 

 

 

 

X

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

datetime

no

 

 

    X

 

 

 

 

 

 

 

 

 

 

 

 

 

?

 

 

 

 

 

bin128

no

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 X

 

 

 

uuid **

no ******

   

 X

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 X

 

 

 

bin256

no

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X

 

 

 

bin512

no

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X

 

 

 

bin1024

no

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X

 

 

 

bin40

no

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X

 

 

 

dec32

no

 

 

 

 

 

 

 

    X

 

 

 

 

 

 

 

 

 

 

?

 

 

 

bin72

no

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X

 

 

 

dec64

no

 

 

 

 

 

 

 

   

 

 

 

 

 

 

 

 

 

 

X

 

 

 

void

yes

 

 

 

 

 

 

 

 

X

 

 

 

 

 

 

 

 

 

 

 

 

 

bit

no

 

 

 

 

 

 

 

 

 

 X

 

 

 

 

 

 

 

 

?

 

 

 

vbin8

no

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X

 

 

 

str8-latin

no

 X

?

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

str8

no

 

X

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

str8-utf16

no

 

X

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

vbin16

no

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X

 

 

 

str16-latin

no

 

X

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

str16

no

 

X

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

str16-utf16

yes

 

X

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

byte-ranges

no

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X

 

 

 

sequence-se

no

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X

 

 

 

vbin32

yes ****

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X

 

 

 

map

no *****

 

 

 

 

X*

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

list

no *****

 

 

 

X

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

array

no

 

 

 

X

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

struct32

no

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

   X

 

 

 

...

** UUID type is unsupported by AMQP 0-8/0-9.x. An exception is thrown on attempt to convert. Should it be converted into short string?It is converted to a long string

*** there is no corresponding type in AMQP 0-8..0-9.x. Thus, the most appropriate type for conversion UTF32 char is long-string.

...

****** Instances of java.util.UUID and java.lang.Character can be specified as part of  ListMessage. They are encoded into AMQP 0-10 types "uuiuuid" and "char"  (one byte) accordingly.

...

AMQP 0-8...0-9-1 message

AMQP 0-10 message

Implemented

Property origin

Property name

type

Header entry

Property name

Type

Comments

message property

delivery mode

octet

delivery-properties

delivery-mode

uint8

 

Y

message property

priority

octet

delivery-properties

priority

uint8

 

Y

message property

expiration

short-string

delivery-properties

expiration

datetime

this is currently modeled as a long

Y

message property

expiration

short-string

delivery-properties

ttl

uint64

expiration - 'arrival-time'

Y

message property

timestamp

long

delivery-properties

timestamp

datetime

this is currently modeled as a long

Y

message property

content type

short-string

message-properties

content-type

str8

 

Y

message property

encoding

short-string

message-properties

content-encoding

str8

 

Y

message property

message id

short-string

message-properties

message-id

uuid

removes 'ID:', if value cannot be converted into uuida new uuid is generated from the existing messageId

Y

message property

correlation id

short-string

message-properties

correlation-id

vbin16

 

Y

message property

user id

short-string

message-properties

user-id

vbin16

 

Y

message property

reply to

short-string

message-properties

reply-to

reply-to 

if BURL we set the exchange and routingKey otherwise the entire string is copied to the routingKey

Y

message property

application id

short-string

message-properties

app-id

vbin16

 

Y

message property

headers

field-table

message-properties

application-headers

map

 

Y

message property

type

short-string

message-properties

application-headers['x-jms-type']

str16

 

Y

message content

 

long

message-properties

content-length

uint64

 

Y

entry delivery count

 

int

delivery-properties

redelivered

bit

dynamically set on sending

 

basic.publish

routing-key

short-string

delivery-properties

routing-key

str8

 

Y

basic.publish

exchange

short-string

delivery-properties

exchange

str8

 

Y

basic.publish

immediate

bit

delivery-properties

immediate

bit

 

Y

basic.publish

mandatory

bit

delivery-properties

discard-unroutable

bit

 

Y

...

AMQP 0-10 message

AMQP 1.0 message

Implemented

 

Property origin

Property name

Type

Section name

Property name

Type

Comments

delivery-properties

delivery-mode

uint8

header

durable

unsigned byte

 

Y

delivery-properties

priority

uint8

header

priority

unsigned byte

 

Y

delivery-properties

ttl

uint64

header

ttl

milliseconds

the 'ttl' delivery-property takes precedence over 'expiration'

Y

delivery-properties

expiration

datetime

header

ttl

milliseconds

the 'ttl' delivery-property takes precedence over 'expiration'; 'absolute-expiry-time' is not used. see QPID-7872

Y

delivery-properties

timestamp

datetime

properties

creation-time

timestamp

 

Y

delivery-properties

redelivered

bit

header

first-acquirer

boolean

 

N

delivery-properties

routing-key

str8

properties

to

string

 

Y

delivery-properties

exchange

str8

properties

to

string

 

Y

delivery-properties

immediate

bit

 

 

 

 

 

delivery-properties

discard-unroutable

bit

   

 

 

message-properties

content-type

str8

properties

content-type

symbol

"application/java-object-stream" replaced with "application/x-java-serialized-object"

Y

message-properties

content-encoding

str8

properties

content-encoding

symbol

 

Y

message-properties

message-id

uuid

properties

message-id

uuid

 

Y

message-properties

correlation-id

vbin16

properties

correlation-id

binary

 

Y

message-properties

user-id

vbin16

properties

user-id

binary

 

Y

message-properties

reply-to

reply-to

properties

reply-to

string 

either <exchange> or <exchange>/<routingKey> or <routingKey>

Y

message-properties

app-id

vbin16

 

 

 

 

 

message-properties

application-headers

map

application-properties

* 

MessageConversionException is thrown when string or key is invalid

Y

message-properties

content-length

uint64

 

 

 

 

 

message-properies headers

qpid.subject

str8

properties

subject

string

 

 YY

message properies headers

JMSXGroupID

str8

properties

group-id

string

 

 YY

message properties headers

JMSXGroupSeq

int

properties

group-sequence

sequence number

 

Y
message-propertiescontent-typestr8message-annotationx-opt-jms-msg-typestring N
message-propertiesapplication-headers['x-jms-type']str16propertiessubjectstring Y

...

AMQP 0-10 message

AMQP 0-9 message

Implemented

 

Property origin

Property name

Type

Section name

Property name

Type

Comments

delivery-properties

delivery-mode

uint8

message property

delivery mode

octet

 

Y

delivery-properties

priority

uint8

message property

priority

octet

 

Y

delivery-properties

ttl

uint64

message property

expiration

short-string

the 'ttl' delivery-property takes precedence over 'expiration'

Y

delivery-propertiesexpiration

datetime

message property

expiration

short-stringthe 'ttl' delivery-property takes precedence over 'expiration'Y

delivery-properties

timestamp

datetime

message property

timestamp

long

 

Y

delivery-properties

redelivered

bit

     

delivery-properties

routing-key

str8

basic.publish

routing-key

short-string Y

delivery-properties

exchange

str8

basic.publishexchangeshort-string Y

delivery-properties

immediate

bit

basic.publish

immediate

bit

 

Y

delivery-properties

discard-unroutable

bit

basic.publish

mandatorybit Y

message-properties

content-type

str8

message property

content type

short-string

 

Y

message-properties

content-encoding

str8

message property

encoding

short-string

 

Y

message-properties

message-id

uuid

message property

message id

short-string

 

Y

message-properties

correlation-id

vbin16

message property

correlation id

short-string

 

Y

message-properties

user-id

vbin16

message property

user id

short-string

if conversion to AMQShortString fails the field is not set

Y

message-properties

reply-to

reply-to

message property

reply to

short-string

convert to BURL

if conversion to AMQShortString fails the MessageConversionException is thrown

Y

message-properties

app-id

vbin16

message property

application-id

short-string

if conversion to AMQShortString fails the field is not set

Y

message-properties

application-headers

map

message property

headersfield-table

 

Y

message-properties

content-length

uint64

 

 

 

 

 

message-propertiesapplication-headers['x-jms-type']str16message propertytypeshort stringthrow MessageConversionException if it does not fit into short stringY

...

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-annotations

x-opt-jms-msg-type

byte

message property

content type

short-string

see table for content conversion below

Y

headercontent-typesymbol

message property

content type

short-string

see table for content conversion belowY

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

See section Address Conversion

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 > 255

See conversion of 'to' below.

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
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

See section Address Conversion.

If an exchange is specified without routingKey the properties.subject is used as routingKey.

Throw MCE if exchange or routingKey conversion to AMQShortString failsThrow 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

Y

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

See secton Address Conversion

Throw MCE if conversion of exchange or routingKey to str8 fails

PartialY

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

See section Address Conversion

Throw MCE if exchange or routingKey conversion to str8 fails

Y

properties

to

string

delivery

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 1.0 messageinternal message  

Section name

Property name

Type

Property class

Property name

type

Comments

Implemented

header

durable

boolean

InternalMessage

InternalMessageMetaData

isPersistent()

isPersistent()

boolean

boolean

 

Y

Y

header

priority

unsigned byte

MessageHeader

getPriority()

byte

 

Y

header/properties

ttl /absolute-expiry-time

milliseconds/ulong

MessageHeader

getExpiration()

longCurrently 'absolute-expiry-time' is used but we should change this to 'ttl' (see QPID-7872)

 

Y

properties

content-type

symbol

 MessageHeader 

getMimeType()

 String

 

TODOY

properties

content-encoding

symbol

MessageHeader

getEncoding()

String


Y

properties

message-id

binary, uuid, ulong, string

MessageHeader

getMessageId()

String

toString() is used for the conversion

Y

properties

correlation-id

binary, uuid, ulong, string

MessageHeader

getCorrelationId()

String

toString() is used for the conversion

Y

properties

user-id

binary

MessageHeader

getUserId()

String

expects 'user-id' to contain UTF-8 bytes. results in mojibake otherwise.

Y

properties

reply-to

string

MessageHeader

getReplyTo()

String


Y

properties

creation-time

timestamp /ulong

MessageHeader

getTimestamp()

long

when creation-time is not set, arrival-time should be set as a timestampis used

YPartial
propertiessubjectstring

MessageHeader

HeaderMap['qpid.subject']

String

should this be done?

N

propertiessubjectstringInternalMessagegetInitialRoutingAddress()Stringrelated: QPID-7868N

properties

group-id

string

 


 

 

N

properties

group-sequence

sequence number

 


 

 

N

properties

to

string

InternalMessage

getTo()

String

 

Y

application-properties

 - map

MessageHeader

HeaderMap

Map

 

Y

headerdelivery-count MessageHeaderredelivered  N

...

Internal message

AMQP 1.0 message

Implemented

 

Property origin

Property name

Type

Section name

Property name

Type

Comments

InternalMessage

InternalMessageMetaData

isPersistent()

isPersistent()

boolean

header

durable

unsigned byte

 

Y

MessageHeader

getPriority()

byte

header

priority

unsigned byte

 

Y

MessageHeader

getExpiration()

long

header

ttl

milliseconds

 

Y

MessageHeader

getExpiration()

long

properties

absolute-expiry-time

timestamp

 

N

MessageHeader

getMessageId()

String

properties

message-id

uuid/string/ulong

 

Y

MessageHeader

getCorrelationId()

String

properties

correlation-id

binary

 

Y

MessageHeader

getUserId()

String

properties

user-id

binary

 

Y

MessageHeader

getTimestamp()

datetime

properties

creation-time

timestamp

 

Y

MessageHeader

getReplyTo()

String

properties

reply-to

string

 

Y

InternalMessage

getTo()

String

properties

to

string

 

TODOY

InternalMessage

getEncoding()

String

properties

content-encoding

symbol

 

Y

MessageHeader

getContentType()

str8

properties

content-type

symbol

 

TODOY

   propertiessubjectstring N

MessageHeader

getHeader(String)/getHeaderNames()

String/Enumeration

application-properties

* 

MessageConversionException is thrown when string or key is invalid

Y

...

N

Internal message

AMQP 0-8...0-9-1 message

Implemented

 

Property origin

Property name

Type

Section name

Property name

Type

Comments

InternalMessage

InternalMessageMetaData

isPersistent()

isPersistent()

boolean

message property

delivery mode

unsigned byte

 

Y

MessageHeader

getPriority()

byte

message property

priority

unsigned byte

 

Y

MessageHeader

getExpiration()

long

message property

expiration

short-string

 

Y

MessageHeader

getMessageId()

String

message property

message-id

short-string

if conversion to short-string fails 'message-id' is not set

Y

MessageHeader

getCorrelationId()

String

message property

correlation-id

short-string

MessageConversionException is thrown when conversion to short-string fails

Y

MessageHeader

getUserId()

String

message property

user-id

short-string

if conversion to short-string fails 'user-id' is not set

Y

MessageHeader

getTimestamp()

datetime

message property

timestamp

long

 

Y

MessageHeader

getReplyTo()

String

message property

reply-to

short-string

shoud potentially See section Address Conversion then convert to BURL.

MessageConversionException should be is thrown when conversion to short-string fails

TODO

InternalMessage

getTo()

String

message property

to

string

 

TODO

Y

InternalMessage

getEncoding()

String

message property

encoding

short-string

MessageConversionException is thrown when conversion to short-string fails

Y

MessageHeader

getMimeType()

String

message property

content-type

short-string

 

TODO

MessageHeader

getContentType()

String

message property

content-type

short-string

 

TODO

   message propertysubjectstring 

Y

MessageHeader

getHeader(String)/getHeaderNames()

String/Enumeration

message property

headers

field-table

MessageConversionException is thrown when key or value is invalid

Y
InternalMessagegetTo() / getInitialRoutingAddress()   

basic.publish

exchange, routing-key

short-string

 TODO
   

basic.publish

exchange

short-string

 TODO

If getTo() is null or the empty string getInitialRoutingAddress() is used instead.
Then see section Address Conversion

Throw MessageConversionException if conversion to short-string fails.

Y
   

basic.publish

immediatebitalways set to false N
   

basic.publish

mandatorybitalways set to false N

AMQP 0-10 message properties conversion into internal message properties

AMQP 0-10 message

Internal message

Implemented

 

Property origin

Property name

Type

Class name

Property name

Type

Comments

delivery-properties

delivery-mode

uint8

InternalMessage

InternalMessageMetaData

isPersistent()

boolean

 

Y

delivery-properties

priority

uint8

MessageHeader

getPriority()

byte

 

Y

delivery-properties

ttl

uint64

MessageHeader

getExpiration()

long

the 'ttl' delivery-property takes precedence over 'expiration'

Y

delivery-propertiesexpiration

datetime

MessageHeader

getExpiration()

longthe 'ttl' delivery-property takes precedence over 'expiration'Y

delivery-properties

timestamp

datetime

MessageHeader

getTimestamp()

long

if not set, the arrival time is used as timestamp

Y

delivery-properties

redelivered

bit

    N

delivery-properties

routing-key

str8

InternalMessage

getInitialRoutingAddress()

String TODOY

delivery-properties

exchange

str8

InternalMessagegetTo()String TODOY

delivery-properties

immediate

bit

 

  

 

N

delivery-properties

discard-unroutable

bit

 

   N

message-properties

content-type

str8

InternalMessage

getContentTypegetMimeType()

String

 

TODOY

message-properties

content-encoding

str8

MessageHeader

getEncoding()

string

 

Y

message-properties

message-id

uuid

MessageHeader

getMessageId()

String

 

Y

message-properties

correlation-id

vbin16

MessageHeader

getCorrelationId()

String

 

Y

message-properties

user-id

vbin16

MessageHeader

getUserId()

String

 

Y

message-properties

reply-to

reply-to

MessageHeader

getReplyTo()

String

<exchange name>/<routing key>

TODOY

message-properties

app-id

vbin16

MessageHeader

getAppId()

String

 

Y

message-properties

application-headers

map

MessageHeader

getHeadersMap()Map<String,Object>

 

Y

message-properties

content-length

uint64

 

 

 

 

 

message-propertiesapplication-headers['x-jms-type']str16MessageHeadergetType()String'x-jms-type' is not removed from application headersY

...

Internal message

AMQP 0-10 message

Implemented

 

Property origin

Property name

Type

Segment name

Property name

Type

Comments

InternalMessage

InternalMessageMetaData

isPersistent()

isPersistent()

boolean

delivery-properties

delivery-mode

uint8

 

Y

MessageHeader

getPriority()

byte

delivery-properties

priority

uint8

 

Y

MessageHeader

getExpiration()

long

delivery-properties

ttl

uint64

 getExpiration() - arrivalTimeY

MessageHeader

getExpiration()

long

delivery-properties

expiration

datetime

 Y

MessageHeader

getMessageId()

String

message-properties

message-id

uuid

if conversion to uuid fails 'message-id' is not set

Y

MessageHeader

getCorrelationId()

String

message-properties

correlation-id

vbin16

MessageConversionException is thrown when conversion to vbin16 fails

Y

MessageHeader

getUserId()

String

message-properties

user-id

vbin16

if conversion to vbin16 fails 'user-id' is not set

Y

MessageHeader

getTimestamp()

datetime

delivery-properties

timestamp

datetime

if timestamp is not set arrivalTime will be used as timestamp

Y

MessageHeader

getReplyTo()

String

message-properties

reply-to

reply-to

See section Address Conversion

MessageConversionException is MessageConversionException should be thrown when conversion to str8 fails.

TODOY

InternalMessage

getTo()/getInitialRoutingKey()

String

delivery-properties

 

 

 

exchange, routing-key

str8

If getTo() is null or the empty string getInitialRoutingAddress() is used instead.
See section Address Conversion.

MessageConversionException is thrown when conversion to str8 fails.

YTODO

InternalMessage

getEncoding()

String

message-properties

content-encoding

str8

MessageConversionException is thrown when conversion to str8 fails

Y

MessageHeader

getMimeType()

String

message-properties

content-type

str8

 

TODOT

MessageHeader

getContentType()

String

message-properties

content-type

str8

 

TODO

MessageHeader

getHeader(String)/getHeaderNames()

String/Enumeration

message-properties

application-headers

map

MessageConversionException is thrown when key or value is invalid

Y
InternalMessage  

message-properties

content-length

uint64 Y   

delivery-properties

routing-key

str8

 TODO   

delivery-properties

exchange

str8

 TODO   

delivery-properties

immediatebit N
   

delivery-properties

discard-unroutablebit N

...

Anchor
address_conversion
address_conversion
Address Conversion

...

This applies to conversion of an address modeled as a simple string (e.g., 'to' and 'reply-to' in AMQP 1.0) to a more structured format like 0-10 (exchange, routingKey) or 0-9 (BURL).

We follow this algorithm:

  1. if the address starts with a global domain prefix matching the virtual host's it is stripped before the following steps
  2. if it contains "/" split on first "/" and if first part refers to existing exchange consider it the exchange and the second part as the routingKey
  3. if it does not contain "/" and it refers to an existing exchange consider it the exchange and the routingKey as the empty string
  4. else consider the address as the routingKey the exchange to the empty string. 

Content conversion

Conversion of message content from AMQP 0-8...0-9-1 into AMQP 0-10 and back is simply a matter of copying the content bytes.

Conversion of message content from AMQP 0-8...0-10 into AMQP 1-0 is based on mime-type of the message (which is set as message property 'content-type'). Depending from mime-type the message content is converted into amqp:amqp-value or amqp:data formats.

Conversion of message content from AMQP 1-0 to AQMQP 0-x is based on the AMQP type used in AMQP 1-0 message

 

AMQP 1.0 to AMQP 0-x

AMQP 1.0 MessageAMQP 0-x Message
body sectionbody data typeannotation x-opt-jms-msg-typecontent-typecontent typecomments
amqp-value



nullanyanysee commentthis case is treated identical to the case where there is no body section (see below)
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 as "common textual media types" 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)anynot setempty 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 as "common textual media types" 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
application/octet-streamapplication/octet-streamempty body
othernot set

empty body

AMQP 0-x to AMQP 1.0

AMQP 0-xAMQP 1.0comments
content typebody sectionbody data typeannotation x-opt-jms-msg-typecontent-type
content types listed as "common textual media types" in section 3.3.7 (Body Sections) of AMQP JMS Mapping specification (WD9)amqp-valuestring5 (TextMessage)copied verbatimif body is empty the amqp-value will contain an empty string
jms/map-message
or amqp/map
amqp-valuemap2 (MapMessage)null

if body is empty the amqp-value will contain an empty map.

Maps whose values fall outside the JMS restrictions must go without the annotation

jms/stream-message
or amqp/list 
amqp-sequencevalues4 (StreamMessage)null

if body is empty the amqp-sequence will be empty.

  List with items that fall outside the JMS restrictions must go without the annotation

application/java-object-stream
or application/x-java-serialized-object
data-sectionbinary1 (ObjectMessage)application/x-java-serialized-object 
application/octet-streamdata-sectionbinary3 (BytesMessage)application/octet-stream 
other with bodydata-sectionbinarynullcopied verbatim 
none with bodydata-sectionbinarynullnull 
other without bodydata-sectionempty binarynullcopied verbatim 
none without bodyamqp-valuenull0 (Message)null 

Internal to AMQP 1.0

InternalAMQP 1.0comments
content typebody

Conversion of message content from AMQP 0-8...0-10 into AMQP 1-0 is based on mime-type of the message (which is set as message property 'content-type'). Depending from mime-type the message content is converted into amqp:amqp-value or amqp:data formats. The table below contains the list of mime-types and corresponding AMQP 1-0 types. * is used to indicate any other mime type which is not listed in the table.

mime type

content type

text/plain

amqp:amqp-value containing string

text/xml

amqp:amqp-value containing string

jms/stream-message

amqp:amqp-value containing list

jms/map-message

amqp:amqp-value containing map

amqp/list

amqp:amqp-value containing list

amqp/map

amqp:amqp-value containing map

*

amqp:data containing binary

Conversion of message content from AMQP 1-0 to AQMQP 0-x is based on the AMQP type used in AMQP 1-0 message

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 0-x Messagecomments
AMQP 1.0 Messagebody sectionbody data typeannotation x-opt-jms-msg-typecontent-typecontent type-jms-msg-typecontent-type
anyStringamqp-valuestring5 (TextMessage)copied verbatim if not null, otherwise text/plainif body is empty the amqp-value will contain an empty string
anyListamqp-sequencevalues4 (StreamMessage)nullLists with members that fall outside the JMS restrictions must go without the annotation
anybyte[]data-sectionbinary3 (BytesMessage)copied verbatim if not null, otherwise application/octet-stream 
anyMapamqp-valuenullanyanytext/plain map2 (MapMessage)nullMaps whose values fall outside the JMS restrictions must go without the annotation
anySee commentamqp-valuevaluenullcopied verbatimFor all Java types that are expressible with AMQP 1.0 primitive types (eg. Java Date as AMQP 1.0 Timestamp).
anySerializabledata-sectionbinary1 (ObjectMessage)application/x-java-serialized-objectIn the implementation, Serializable needs to be considered after the other non-null bodies.
othernullamqp-valuenull copied verbatim 

AMQP 1.0 to Internal

data
binary (bytes[])
AMQP 1.0 MessageInternal Message
body sectionbody data typeannotation x-opt-jms-msg-typecontent-typebody objectcontent typecomments
amqp-value



nullanyanynullsee commentthis case is treated identical to the case where there is no body section (see below)
stringanycontent types listed as "common textual media types" in section 3.3.7 (Body Sections) of AMQP JMS Mapping specification (WD9)Stringcopied verbatim 
otherString"text/plain" 
mapanyanyMap<Object,Object>null 
listanyanyList<Object>null 
otheranyanyObjectcopied verbatim 
amqp-sequenceanyanyanyList<Object>

null

 
data






binary (byte[])






0 (Message)anybyte[]copied verbatim or "application/octet-stream" if null 
1 (ObjectMessage)anybyte[]copied verbatim or "application/x-java-serialized-object" if null 
2 (MapMessage)anybyte[]

copied verbatim or "application/octet-stream" if null

 
3 (BytesMessage)anybyte[]copied verbatim or "application/octet-stream" if null 
4 (StreamMessage)anybyte[]copied verbatim or "application/octet-stream" if null 
5 (TextMessage)anybyte[]copied verbatim or "application/octet-stream" if null 
other or not set

any

byte[]copied verbatim or "application/octet-stream" if null
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
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/plainnullnull empty body
1 (ObjectMessage)anynullapplication/x-java-serialized-object-stream body will contain serialized null
2 (MapMessage)anyjms/map-messagenullnull body will contain a serialized empty map
3 (BytesMessage)anynullapplication/octet-streamempty body 
4 (StreamMessage)anyjms/stream-messagenullnull empty body
5 (TextMessage)content types listed as "common textual media types" in section 3.3.7 (Body Sections) of AMQP JMS Mapping specification (WD9)nullcopied verbatim 
othernullanytext/plainempty body 
other or nullanynullcopy verbatim 

AMQP 0-8...0-9-1 to AMQP 0-10 and vice versa

No conversion is necessary. Content and contentType are simply copied.

AMQP 0-x to Internal

content types listed
AMQP 0-xInternal Messagecomments
content typebody objectcontent-type
content types listed as "common textual media types" other or not set in section 3.3.7 (Body Sections) of AMQP JMS Mapping specification (WD9)text/plainStringcopied verbatimif body is empty the body object will contain an empty Stringempty body
jms/map-messageMapnullif body is empty, the body object will contain an empty Map
or amqp/mapjms/map-messageMapnullif body is empty, the body object will contain an empty Mapbody will contain a serialized empty map
jms/stream-message or Listnullif body is empty, the body object will contain an empty List
amqp/listjms/stream-messageListnullif body is empty, the body object will contain an empty List
application/java-object-streambyte[]application/x-java-serialized-objectif body is empty, the body object will contain an empty byte array
application/x-java-serialized-objectbyte[]empty bodyapplication/x-java-serialized-object or objectif body is empty, the body object will contain an empty byte array
application/javaoctet-object-streambyte[]application/javaoctet-object-streamif body is empty, the body object will contain serialized nullan empty byte array
othertext/plain

empty body

AMQP 0-8...0-9-1 to AMQP 1.0

byte[] or nullcopied verbatimif body is empty, the body object will be set to null

Internal to AMQP 0-x

AMQP 1.0 sectioncontent-type
InternalAMQP 0-xAMQP 0-8...0-9-1comments
content typebodybody data content-typeannotation x-opt-jms-msg-type
anyStringtext/plainamqp-valuestring5 (TextMessage)text/plainTODO if body is empty... ?
text/xmlamqp-valuestring5 (TextMessage)text/xmlTODO
jms/map-message     
amqp/map     
jms/stream-message     
amqp/list     
if body is null, content will be empty
anyListjms/stream-message or  amqp/listif list items of simple types(string, boolean, double, float, byte[] (Binary), null, byte, short, integer, long ), otherwise conversion to "amqp/list" is attempted. Otherwise content is converted as per Serializable.
anybyte[]copied verbatim if not null, otherwise application/octet-stream 
anyMapjms/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 content is converted as per Serializable.

anySerializableapplication/java-object-stream     
application/x-java-serialized-object     
application/octet-stream     
In the implementation, Serializable needs to be considered after the other non-null bodies.
othernullcopied verbatimother or none      

Conversion issues

This section summarises existing conversion issues

...