mirror of
https://github.com/mailscope/kumomta.git
synced 2026-09-21 01:05:31 +00:00
972 B
972 B
client:publish({PARAMS})
{{since('2026.03.04-bb93ecb1')}}
Sends a message. PARAMS is an object style table with the following keys:
subject- required string; the name of the subject to which to send the messagepayload- required string; the message to sendheaders- optional NATS headersawait_ack- optional wait for server acknowledgement (default: true)
In case await_ack is set to true, publish returns an acknowledgment with the following values:
stream: name of stream the message was published tosequence: sequence number the message was published indomain: domain the message was published todeplicate: true if the published message was determined to be a duplicate, false otherwisevalue: used only when published against stream with counters enabled
nats:publish {
subject = 'subject',
payload = 'payload',
headers = {
['Nats-Msg-Id'] = 'unique-id',
},
await_ack = true,
}