tranger2_open_rt_mem()
#
Opens a real-time memory stream for a given topic in tranger
. This function enables real-time message processing for the specified key
and applies filtering conditions from match_cond
. The callback tranger2_load_record_callback_t
is invoked when new records are appended.
Prototype
json_t *tranger2_open_rt_mem(
json_t *tranger,
const char *topic_name,
const char *key, // if empty receives all keys, else only this key
json_t *match_cond, // owned
tranger2_load_record_callback_t load_record_callback, // called on append new record on mem
const char *list_id, // rt list id, optional (internally will use the pointer of rt)
const char *creator,
json_t *extra // owned, user data, this json will be added to the return iterator
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
Pointer to the TimeRanger database instance. |
|
|
Name of the topic for which real-time memory streaming is enabled. |
|
|
Specific key to monitor. If empty, all keys are monitored. |
|
|
JSON object containing filtering conditions. Owned by the function. |
|
|
Callback function invoked when a new record is appended in memory. |
|
|
Optional identifier for the real-time list. If empty, the internal pointer is used. |
|
|
Identifier of the entity creating the real-time memory stream. |
|
|
Additional user data stored in the returned iterator. Owned by the function. |
Return Value
Returns a JSON object representing the real-time memory stream. The caller does not own the returned object.
Notes
This function is valid when the Yuno instance is the master writing real-time messages from tranger2_append_record()
.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples