Skip to main content
Skip table of contents

Message Transformation

The exchange of messages between clients and the embedded SwiftMQ router can take place via JMS, AMQP, and MQTT. Messages arrive as JMS messages at the queue or topic, regardless of which protocol was used for the transfer.

  • JMS messages are not transformed. They arrive in the queue or topic as is.

  • AMQP messages are transformed according to AMQP 1.0 and AMQP 0.9.1 message transformation.

  • MQTT messages arrive as JMS BytesMessage.

SwiftMQ to Kafka Transformation

Messages in the source queue or topic are converted into a Kafka record as follows:

  • BytesMessage bodies to a byte array.

  • TextMessage bodies to a string.

  • MapMessage bodies to a JSON object (stringified).

  • Message without a body to a JSON object (stringified) containing the properties of the message.

The serializer is applied after this conversion:

  • String serializer creates a string from a byte array.

  • ByteArray serializer creates a byte array from a string.

Kafka to SwiftMQ Transformation

Messages received from Kafka are transformed according to the deserializer of the bridge:

  • String creates a JMS TextMessage and sets the body to a string.

  • ByteArray creates a JMS BytesMessage and set the body to a byte array.

A message property key is set on all messages which contain the Kafka key if set.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.