Versions Compared

Key

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

...

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-8..0-9-1

Conversion follows this algorithm:

  1. A converter is determined from...
    1. if message has a body...
      1. data
    2. ...else from typeHint which is taken from...
      1. from the message annotation "x-opt-jms-msg-type"
      2. from the message property "content-type"
    3. ...if no typeHint is found and message has no body then "text/plain" is used
    4. ...else throw MessageConversionException
  2. Mime type of the converted message is set from the converter unless
    1. typeHint is "application/java-object-stream" or "application/x-java-serialized-object" in which case it is set to "application/java-object-stream"
    2. typeHint is a known text mime type (see JMS bindmap) in which case it is set to "text/plain"
AMQP 1.0AMQP 0-8
content-typex-opt-jms-msg-typebody typecontent-typebodyCommentsImplemented
---text/plain-  
--dataapplication/octet-streamcontent of data value  
*BYTE_MESSAGEdataapplication/octet-stream-  
*BYTE_MESSAGE-application/octet-stream-  
application/x-java-serialized-object-dataapplication/java-object-streamcontent of data value  
application/x-java-serialized-object--application/java-object-stream-  
*OBJECT_MESSAGEdataapplication/java-object-streamcontent of data value  
*OBJECT_MESSAGE-application/java-object-stream-  
--amqp-sequence (if simple type is used )jms/stream-messagelist with amqp-sequence values  -STREAM_MESSAGEamqp-sequence (if simple type is used )jms/stream-messagelist with amqp-sequence values  
-STREAM_MESSAGE-jms/stream-messageempty list  
-

-/

4

STREAM_MESSAGE

amqp-sequence (if non simple type is use)  throw MessageConversionException 
--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/map0-10 encoded map  
 -amqp-value with value of map with either non string keys or non simple values, or string key with length > 255  throw MessageConversionException 
-MAP_MESSAGE-amqp/mapempty 0-10 encoded map  
 MAP_MESSAGEamqp-value with value of map with either non string keys or non simple values, or string key with length > 255  throw MessageConversionException 
-TEXT_MESSAGE-text/plain-  
text/plain--text/plain-  
--amqp vallue value with string or nulltext/plainstring value  
*TEXT_MESSAGEamqp vallue value with string or nulltext/plainstring value  
text/*-datatext/*data bytes as string  
application/xml-dataapplication/xmldata bytes as string  
application/*+xml-dataapplication/*+xmldata bytes as string  
application/xml-dtd-dataapplication/xml-dtddata bytes as string  
application/json-dataapplication/jsondata bytes as string  
application/*+json-dataapplication/*+jsondata bytes as string  
application/javascript-dataapplication/javascriptdata bytes as string  
application/ecmascript-dataapplication/ecmascriptdata bytes as string  
***  throw MessageConversionException 

...