Versions Compared

Key

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

...

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



nullanyanytext/plainsee 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)anytext/plainnot 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
othertext/plainnot set

empty body

AMQP 0-

...

x to AMQP 1.0

string5 TextMessage
AMQP 0-8...0-9-1xAMQP 1.0comments
content typebody sectionbody data typeannotation x-opt-jms-msg-typecontent-type
text/plaincontent types listed as "common textual media types" in section 3.3.7 (Body Sections) of AMQP JMS Mapping specification (WD9)amqp-valuestring5 (TextMessage)text/plaincopied verbatimTODO if body is empty ... ?text/xmlthe amqp-value will contain the encoded empty string
jms/map-messageamqp-valuemap2 (MapMessage)text/xmlTODO
jms/map-message     
nullMaps whose values fall outside the JMS restrictions must go without the annotation
amqp/mapamqp-valuemap2 (MapMessage)nullamqp/map     
jms/stream-message amqp-sequence   values4 (StreamMessage)nullMaps with members that fall outside the JMS restrictions must go without the annotation 
amqp/list amqp-sequence  values4 (StreamMessage)null  
application/java-object-stream    data-sectionbinary1 (ObjectMessage)application/x-java-serialized-object 
application/x-java-serialized-objectdata-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   
other or none without body amqp-value  null0 (Message)null  

 

Conversion issues

This section summarises existing conversion issues

...