You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Current Behaviour

 

The page documents the current (trunk 2016-11-04, r1767914) behaviour of the WMC's message preview feature under the following test cases.

 

Test CaseMessage
small text messageJMS TextMessage "hello world"
large text messageJMS TextMessage "ABCD" repeated 1024^2 times
small map messageJMS MapMessage one key/value pair of each supported type. String pair value is (1)
large map messageJMS Map Message one key/value pair of each supported type. String pair value is (2)
small stream messageJMS Stream Message containing pair of each support type. String value is (1)
large stream messageJMS Stream Message containing pair of each support type. String value is (2)
small object messageJMS Object Message containing List comprising string value (1) and an integer
large object messageMS Object Message containing List comprising string value (2) and an integer

large pdf file

JMS Bytes Message containing a PDF (2102551 bytes)

 

(1) String "hello world"

(2) "ABCD" repeated 1024^2 times


Test CaseProtocol 0-9/0-10
Content TypeOn screen previewContent Download
small text messagetext/plaincomplete string valueditto preview
large text messagetext/plaintruncated string valuecomplete string value
small map message (default)amqp/mapTable containing name/value pairs
Map entry with bytes array value is base64 encoded 
The map's contents encoded as a AMQP 0-10 map

 

large map message (default)amqp/mapError popup 'unknown code 67'
No preview displayed.
Broker survives. Stack trace (1)
small map message (legacy)jms/map-message
Table containing name/value pairs
Map entry with bytes array value is base64 encoded 

Each written value is encoded by the TypedBytesContentWriter (2)

large map message (legacy)jms/map-message
Table containing name/value pairs
Map entry with bytes array value is array of ints
small stream messageamqp/listTable containing list values

The list's contents encoded as a AMQP 0-10 list

large stream messageamqp/listError popup 'unknown code 67'
No preview displayed.
Broker survives. Stack trace (1)
small stream message (default - legacy)jms/stream-messageNo preview

Each written value is encoded by the TypedBytesContentWrite

large stream message (default - legacy)jms/stream-messageNo preview
small object messageapplication/java-object-streamNo previewSerialised object bytes
large object messageapplication/java-object-streamNo preview

large pdf file

application/octet-streamNo previewthe pdf file.

ff

 

Test CaseProtocol 1.0
Content TypeOn screen previewContent Download
small text messageNot present in AMQP 1.0







No preview







All the sections that comprise the immutable bare message, encoded in AMQP 1.0

 

 



large text message
small map message
large map message
small stream message
large stream message
small object message
large object message

large pdf file

 

(1) 

2016-11-04 11:01:43,128 DEBUG [HttpManagement-HTTP-218] (o.a.q.s.m.p.s.r.RestServlet) - IllegalArgumentException processing request
java.lang.IllegalArgumentException: unknown code: 67
at org.apache.qpid.transport.codec.AbstractDecoder.getType(AbstractDecoder.java:354) ~[classes/:na]
at org.apache.qpid.transport.codec.AbstractDecoder.readMap(AbstractDecoder.java:287) ~[classes/:na]
at org.apache.qpid.server.protocol.v0_8.MessageConverter_v0_8_to_Internal.convertMessageBody(MessageConverter_v0_8_to_Internal.java:340) ~[classes/:na]
at org.apache.qpid.server.protocol.v0_8.MessageConverter_v0_8_to_Internal.convert(MessageConverter_v0_8_to_Internal.java:86) ~[classes/:na]
at org.apache.qpid.server.protocol.v0_8.MessageConverter_v0_8_to_Internal.convert(MessageConverter_v0_8_to_Internal.java:48) ~[classes/:na]
at org.apache.qpid.server.queue.AbstractQueue.createMessageContent(AbstractQueue.java:3731) ~[classes/:na]
at org.apache.qpid.server.queue.AbstractQueue.getMessageContent(AbstractQueue.java:3701) ~[classes/:na]
at org.apache.qpid.server.queue.StandardQueueImplWithAccessChecking.getMessageContent(StandardQueueImplWithAccessChecking.java:80) ~[classes/:na]

 

(2) TypedBytesContentWriter is distinct from AMQP value system)

(3) http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#section-message-format

Current Problems

Preview feature

  1. As the preview uses JSON, there is type-information loss (e.g. a list that comprises shorts in indistinguishable from a list of ints).
  2. The representation of byte-arrays is inconsistent between  truncated and untruncated previews (Base64 vs JSON array of integers),
  3. A byte array serialised as Base64 may be misinterpreted as a String. 
  4. Previewing the large map and large list encoded as AMQP 0-10 fails within the internal message conversion (why?)
  5. As we already offer a preview of the amqp/lists is seems odd that the same is not offered for the jms/stream-message
  6. AMQP 1.0 doesn't offer any previews (because the server currently only obeys returnJson if the message carries a known AMQP 0-8..0-10 mime type)

Content Download

  1. In AMQP 0-8..0-10, getContent is useful for bytes/text/object messages.  For users of AMQP 1.0, the getContent returns the concatenation of the immutable 'bare message' which is useless to the end user (unless they are prepared to decode the AMQP).

API

  1. The way limit applies to Json (truncating, but retaining a syntactically valid response if possible), seems surprising (at least to me). 

Suggested Behaviour

 

 

  • No labels