Jakarta Messaging Property Fields

EMS supports the Jakarta Messaging property fields described in EMS Message Properties.

Import

The EMS server always sets the JMS_TIBCO_IMPORTED property with value true on an imported message to indicate that the message did not originate from an EMS client.

Message Headers

When translating an incoming Kafka message into an EMS message, the server first handles any Jakarta Messaging Header Fields present in the Kafka message headers.

Each remaining header is then translated into a String property on the EMS message. The header name serves as the property name and the converted header value serves as the property value. The value is converted into a plain string if possible, or a Base64-encoded string if it contains binary data.

Message Key Default Translation

If the Kafka message carries a key, the server sets the JMS_TIBCO_IMPORTED_KEY property of type String on the translated EMS message. The property’s value is the Kafka message key converted into a plain string, or a Base64-encoded string if it contains binary data.

Message Key Translation using Apache Avro™ Schemas

EMS transports for Kafka can be configured to connect to a TIBCO Schema Repository deployment and obtain Apache Avro schemas for deserialization of imported Kafka message keys.

If the message carries a key which references a schema ID, the EMS server will set the
JMS_TIBCO_IMPORTED_KEY_SCHEMA_ID property of type Long on the translated EMS message, with the schema ID serving as the value.

If the EMS server is able to obtain the schema corresponding to that schema ID, it will attempt to deserialize the key into a JSON format string. If the deserialization is successful, the JMS_TIBCO_IMPORTED_KEY property of type String is set on the translated EMS message, with the JSON serving as the value.

If the imported Kafka message’s key does not reference a schema ID, or if the schema cannot be retrieved or the deserialization process is unsuccessful, the EMS server defaults to the behavior outlined in the Message Key Default Translation section.

To enable this behavior, configure the schema_repository property in the transport definition.

Note: When the EMS server imports a Kafka message via a transport configured with schema_repository and finds a schema ID in the message key, it always sets the JMS_TIBCO_IMPORTED_KEY_SCHEMA_ID property in the translated EMS message. This occurs regardless of whether a schema can be retrieved for that ID or the deserialization succeeds.

Export

The EMS server converts the Jakarta Messaging properties and their values into key/value pairs (all property field values are converted to strings) and sets them as headers in the outgoing Kafka message.

The EMS server ignores any Jakarta Messaging property fields that are not set, or are set to null—it omits them from the exported message.