trq_open()

trq_open()#

trq_open() initializes and opens a persistent queue using the specified tranger instance and topic configuration.

Prototype

tr_queue trq_open(
    json_t           *tranger,
    const char       *topic_name,
    const char       *pkey,
    const char       *tkey,
    system_flag2_t    system_flag,
    size_t           backup_queue_size
);

Parameters

Key

Type

Description

tranger

json_t *

Pointer to the tranger instance managing the queue.

topic_name

const char *

Name of the topic associated with the queue.

pkey

const char *

Primary key used for indexing messages in the queue.

tkey

const char *

Time key used for ordering messages in the queue.

system_flag

system_flag2_t

System flags controlling queue behavior.

backup_queue_size

size_t

Maximum number of messages to retain in the backup queue.


Return Value

Returns a tr_queue handle representing the opened queue, or NULL on failure.

Notes

Ensure that tranger2_startup() is called before invoking trq_open().

Prototype

// Not applicable in JS

Prototype

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