A Kafkorma message is composed of various pieces of information which are listed below. The subject
and
content
properties are mandatory and are required to be non-empty strings, while the other properties have default
values that are either empty strings or are indicated in bold below.
Property | Values | Description |
---|---|---|
subject |
any valid subject | the subject of the message |
content |
any UTF-8 string | the content of the message |
closure |
any UTF-8 string | the ID of the message |
retained |
true or false |
indicate whether or not the message should be/was retained by the server |
compressed |
true or false |
indicate whether or not the message should be/was compressed |
qos |
STANDARD or GUARANTEED |
indicate the quality of the service of the message |
type |
update , recovered , snapshot , or historical |
the type of the message |
replySubject |
any valid subject | publishers can attach a replySubject to a message, to which subscribers can send reply messages |
Kafkorma client API provides methods to create messages from application-specific data, publish messages, and retrieve the application-specific data from messages when received by subscribers.
A subscriber will receive real-time messages labeled with update
message type. If the Kafkorma cluster is configured
to use Guaranteed Message Delivery as quality of the service (QoS) and the subscriber
reconnects after a failure, any messages that were missed during the recovery period for the subjects it subscribed to
will be obtained upon reconnection to the cluster. These missed messages will be labeled with recovered
message type.
The other message types snapshot
and history
are detailed in the section History.
The replySubject
property enables request/reply interactions over persistent WebSocket connections, which
can be useful in specific scenarios where the default publish/subscribe model does not apply.