THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
AMQP 1.0 to AMQP 0-8..0-9-1
Conversion follows this algorithm:
...
AMQP 1.0 Message | AMQP 0-8 Message | ||||
---|---|---|---|---|---|
body section | body data type | annotation |
...
- data
...
x-opt-jms-msg-type |
---|
...
...
content-type |
---|
...
- typeHint is "application/java-object-stream" or "application/x-java-serialized-object" in which case it is set to "application/java-object-stream"
- typeHint is a known text mime type (see JMS bindmap) in which case it is set to "text/plain"
content type | comments | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
amqp-value | null | any | any | text/plain | |||||||
string | any | any | text/plain | ||||||||
map | any | any | jms/map-message or amqp/map (0-10) | 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 | |||||||||
AMQP 1.0 | AMQP 0-8 | ||||||||||
content-type | x-opt-jms-msg-type | body type | content-type | body | Comments | Implemented | |||||
- | - | - | text/plain | - | |||||||
- | - | data | application/octet-stream | content of data value | |||||||
* | BYTE_MESSAGE | data | application/octet-stream | - | |||||||
* | BYTE_MESSAGE | - | application/octet-stream | - | |||||||
application/x-java-serialized-object | - | data | application/java-object-stream | content of data value | |||||||
application/x-java-serialized-object | - | - | application/java-object-stream | - | |||||||
* | OBJECT_MESSAGE | data | application/java-object-stream | content of data value | |||||||
* | OBJECT_MESSAGE | - | application/java-object-stream | - | |||||||
- | -/STREAM_MESSAGE | amqp-sequence (if simple type is used ) | jms/stream-message | list with amqp-sequence values | |||||||
- | STREAM_MESSAGE | - | jms/stream-message | empty list | |||||||
- | -/STREAM_MESSAGE | amqp-sequence (if non simple type is use) | throw MessageConversionException | ||||||||
if list items of simple types(string, boolean, double, float, byte[] (Binary), null, byte, short, integer, long ), 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 MessageConversionException is thrown | ||||||
data | binary (bytes[]) | 0 (Message) | any | text/plain | without a body | ||||||
1 (ObjectMessage) | any | application/java-object-stream | - | - | amqp-value with value of map with string keys (of length <255) and simple type values (string, boolean, long, integer, short, byte, float, double, byte[]) | amqp/map | 0-10 encoded map | ||||
2 (MapMessage) | -anyamqp-value with value of map with either non string keys or non simple values, or string key with length > 255 | application/octet-stream | |||||||||
throw MessageConversionException | - | MAP_MESSAGE | - | amqp/map | 3 (BytesMessage) | any | application/octet-streamempty 0-10 encoded map | ||||
MAP_MESSAGE | 4 (StreamMessage) | any | application/octet-streamamqp-value with value of map with either non string keys or non simple values, or string key with length > 255 | ||||||||
throw MessageConversionException | - | TEXT_MESSAGE | 5 (TextMessage) | any- | text/plain | - | |||||
text/plainother | -any | - | text/plain | MessageConversionException- | |||||||
- | - | amqp value with string or null content types listed in section 3.3.7 (Body Sections) of AMQP JMS Mapping specification (WD9) | text/plain | string value | |||||||
*- | TEXT_MESSAGE | amqp value with string or null | text/plain | string value | other | application/octet-stream | |||||
no body | N/A | 0 (Message) | any | text/plain | text/* | - | data | text/* | data bytes as string | ||
application/xml | - | 1 (ObjectMessage) | anydata | application/xmljava-object-stream | data bytes as string | ||||||
application/*+xml | - | data | application/*+xml | 2 (MapMessage) | any | jms/map-messagedata bytes as string | |||||
application/xml-dtd | - | 3 (BytesMessage) | anydata | application/xmloctet-dtdstream | data bytes as string | ||||||
application/json | - | data | application/json | 4 (StreamMessage) | any | jms/stream-message | data bytes as string | ||||
application/*+json | - | data | application/*+json | 5 (TextMessage) | any | text/plain | data bytes as string | ||||
application/javascriptother | -any | data | application/javascript | data bytes as string | MessageConversionException | ||||||
application/ecmascript | - | data | application/ecmascript | - | content types listed in section 3.3.7 (Body Sections) of AMQP JMS Mapping specification (WD9) | text/plain | data bytes as string | ||||
*- | * | * | - | application/octet-streamthrow MessageConversionException |
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
...