Skip to content

implement comprehensive support for SDK 0.9.x message structure #9

@Lance-Drane

Description

@Lance-Drane

In https://github.com/INTERSECT-SDK/intersect-python-common/tree/main/src/intersect_sdk_common , the 0.9.0 release entails a few things:

  • changed message structure to put metadata in message headers (instead of serializing it into JSON with the data)
  • dropped MQTT v3 support in favor of v5 support, necessary to support above
  • allow for binary data in the message itself

(for original source of comment, see here)

Therefore, the following changes will need to be made:

  • rewrite MQTT handler to work with 5.0 instead of 3.1.1, and get/set metadata properties in user properties instead of the payload
  • rewrite AMQP handler to get/set metadata properties in headers instead of payload
  • switch to WebSockets and use a different exchange representation for a message

Suggestion for Websocket message representation

Headers must be key-value strings, and it is expected that these strings will NOT contain any ASCII control characters. Therefore:

  • assume that keys will always come before values
  • separate key names from their values with a specific control character "A"
  • after a value, use a specific control character "B" to signify that a new header key-value pair will occur
  • after a value, use a specific control character "C" to signify that only the payload remains in the message
  • assume that there is no special parsing logic for the payload
  • do NOT use \0 characters as a control character

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions