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 |
|---|---|---|
|
|
Pointer to the |
|
|
Name of the topic associated with the queue. |
|
|
Primary key used for indexing messages in the queue. |
|
|
Time key used for ordering messages in the queue. |
|
|
System flags controlling queue behavior. |
|
|
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