Versions Compared

Key

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

...

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

str8if '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"

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

...

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

MessageConversionException should be thrown when conversion to str8 fails

TODO

InternalMessage

getTo()

String

delivery-properties

 

 

 

TODO

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

 

TODO

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.

...