pulsar-client-cpp
Loading...
Searching...
No Matches
reader.h
1
19#pragma once
20
21#include <pulsar/c/message.h>
22#include <pulsar/c/result.h>
23#include <pulsar/defines.h>
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29typedef struct _pulsar_reader pulsar_reader_t;
30
31typedef void (*pulsar_result_callback)(pulsar_result, void *);
32
36PULSAR_PUBLIC const char *pulsar_reader_get_topic(pulsar_reader_t *reader);
37
48PULSAR_PUBLIC pulsar_result pulsar_reader_read_next(pulsar_reader_t *reader, pulsar_message_t **msg);
49
59PULSAR_PUBLIC pulsar_result pulsar_reader_read_next_with_timeout(pulsar_reader_t *reader,
60 pulsar_message_t **msg, int timeoutMs);
61
71PULSAR_PUBLIC void pulsar_reader_seek_async(pulsar_reader_t *reader, pulsar_message_id_t *messageId,
72 pulsar_result_callback callback, void *ctx);
73
82PULSAR_PUBLIC pulsar_result pulsar_reader_seek(pulsar_reader_t *reader, pulsar_message_id_t *messageId);
83
93PULSAR_PUBLIC void pulsar_reader_seek_by_timestamp_async(pulsar_reader_t *reader, uint64_t timestamp,
94 pulsar_result_callback callback, void *ctx);
95
104PULSAR_PUBLIC pulsar_result pulsar_reader_seek_by_timestamp(pulsar_reader_t *reader, uint64_t timestamp);
105
106PULSAR_PUBLIC pulsar_result pulsar_reader_close(pulsar_reader_t *reader);
107
108PULSAR_PUBLIC void pulsar_reader_close_async(pulsar_reader_t *reader, pulsar_result_callback callback,
109 void *ctx);
110
111PULSAR_PUBLIC void pulsar_reader_free(pulsar_reader_t *reader);
112
113PULSAR_PUBLIC pulsar_result pulsar_reader_has_message_available(pulsar_reader_t *reader, int *available);
114
115PULSAR_PUBLIC int pulsar_reader_is_connected(pulsar_reader_t *reader);
116
117#ifdef __cplusplus
118}
119#endif