Versions Compared

Key

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

...

(1) String "hello world"

(2) "ABCD" repeated 1024^2 65535/4 times

Protocol 0-8..0-10

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/mapTable containing name/value pairs
Map entry with bytes array value is array of ints
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/listTable containing list values
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.

...

Current Problems

Preview feature

 

 

  1. As the preview feature uses JSON, which carries no type information, there is ambiguity in the presented information. However, as the user of this feature is likely to have some familiarity with the application domain (perhaps as a programmer or operator), this is not necessarily a blocker.  Examples:

...

    1. A list that comprises shorts is indistinguishable from a list of ints
    2. Some strings are indistinguishable from byte arrays encoded as Base64.
  1. The representation of byte-arrays is inconsistent between previews of truncated and untruncated previews (Base64 for untruncated vs JSON array of integers for truncated ones)
  2. A preview is offered for amqp/lists but not  jms/stream-message, which is the JMS client's default for StreamMessage.  There seems to be no good reason for this.
  3. There is no preview for AMQP 1.0 message at all.

...

I think I would have preferred that the REST API implemented RFC 7233 Ranges, and the REST API have the responsibility to chunk the response from getMessageContent.  Chunks would not necessarily be  syntactically valid JSON. If the The client would need to intercept the "206 Partial Content" response and know that the response is incomplete.   In this case, the client would fallback back on showing a hex dump style preview of the raw content bytes itself.

...