pulsar-client-cpp
Loading...
Searching...
No Matches
reader_configuration.h
1
20#pragma once
21
22#include <pulsar/c/message.h>
23#include <pulsar/c/reader.h>
24#include <pulsar/defines.h>
25
26#include "consumer_configuration.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32typedef struct _pulsar_reader_configuration pulsar_reader_configuration_t;
33
34typedef void (*pulsar_reader_listener)(pulsar_reader_t *reader, pulsar_message_t *msg, void *ctx);
35
36PULSAR_PUBLIC pulsar_reader_configuration_t *pulsar_reader_configuration_create();
37
38PULSAR_PUBLIC void pulsar_reader_configuration_free(pulsar_reader_configuration_t *configuration);
39
44PULSAR_PUBLIC void pulsar_reader_configuration_set_reader_listener(
45 pulsar_reader_configuration_t *configuration, pulsar_reader_listener listener, void *ctx);
46
47PULSAR_PUBLIC int pulsar_reader_configuration_has_reader_listener(
48 pulsar_reader_configuration_t *configuration);
49
71PULSAR_PUBLIC void pulsar_reader_configuration_set_receiver_queue_size(
72 pulsar_reader_configuration_t *configuration, int size);
73
74PULSAR_PUBLIC int pulsar_reader_configuration_get_receiver_queue_size(
75 pulsar_reader_configuration_t *configuration);
76
77PULSAR_PUBLIC void pulsar_reader_configuration_set_reader_name(pulsar_reader_configuration_t *configuration,
78 const char *readerName);
79
80PULSAR_PUBLIC const char *pulsar_reader_configuration_get_reader_name(
81 pulsar_reader_configuration_t *configuration);
82
83PULSAR_PUBLIC void pulsar_reader_configuration_set_subscription_role_prefix(
84 pulsar_reader_configuration_t *configuration, const char *subscriptionRolePrefix);
85
86PULSAR_PUBLIC const char *pulsar_reader_configuration_get_subscription_role_prefix(
87 pulsar_reader_configuration_t *configuration);
88
89PULSAR_PUBLIC void pulsar_reader_configuration_set_read_compacted(
90 pulsar_reader_configuration_t *configuration, int readCompacted);
91
92PULSAR_PUBLIC int pulsar_reader_configuration_is_read_compacted(pulsar_reader_configuration_t *configuration);
93
94PULSAR_PUBLIC void pulsar_reader_configuration_set_default_crypto_key_reader(
95 pulsar_reader_configuration_t *configuration, const char *public_key_path, const char *private_key_path);
96
97PULSAR_PUBLIC pulsar_consumer_crypto_failure_action
98pulsar_reader_configuration_get_crypto_failure_action(pulsar_reader_configuration_t *configuration);
99
100PULSAR_PUBLIC void pulsar_reader_configuration_set_crypto_failure_action(
101 pulsar_reader_configuration_t *configuration,
102 pulsar_consumer_crypto_failure_action crypto_failure_action);
103
104#ifdef __cplusplus
105}
106#endif