trq_append()

trq_append()#

trq_append() appends a new message to the queue, storing it persistently.

Prototype

q_msg trq_append(
    tr_queue  trq,
    json_t   *jn_msg  // owned
);

Parameters

Key

Type

Description

trq

tr_queue

The queue instance where the message will be appended.

jn_msg

json_t *

The JSON message to append. Ownership is transferred to the function.


Return Value

Returns a q_msg handle to the newly appended message, or NULL on failure.

Notes

The message must be flagged after appending if it needs to be recovered in the next session using trq_load().

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples