22#include <pulsar/c/message.h>
23#include <pulsar/c/reader.h>
24#include <pulsar/defines.h>
26#include "consumer_configuration.h"
32typedef struct _pulsar_reader_configuration pulsar_reader_configuration_t;
34typedef void (*pulsar_reader_listener)(pulsar_reader_t *reader, pulsar_message_t *msg,
void *ctx);
36PULSAR_PUBLIC pulsar_reader_configuration_t *pulsar_reader_configuration_create();
38PULSAR_PUBLIC
void pulsar_reader_configuration_free(pulsar_reader_configuration_t *configuration);
44PULSAR_PUBLIC
void pulsar_reader_configuration_set_reader_listener(
45 pulsar_reader_configuration_t *configuration, pulsar_reader_listener listener,
void *ctx);
47PULSAR_PUBLIC
int pulsar_reader_configuration_has_reader_listener(
48 pulsar_reader_configuration_t *configuration);
71PULSAR_PUBLIC
void pulsar_reader_configuration_set_receiver_queue_size(
72 pulsar_reader_configuration_t *configuration,
int size);
74PULSAR_PUBLIC
int pulsar_reader_configuration_get_receiver_queue_size(
75 pulsar_reader_configuration_t *configuration);
77PULSAR_PUBLIC
void pulsar_reader_configuration_set_reader_name(pulsar_reader_configuration_t *configuration,
78 const char *readerName);
80PULSAR_PUBLIC
const char *pulsar_reader_configuration_get_reader_name(
81 pulsar_reader_configuration_t *configuration);
83PULSAR_PUBLIC
void pulsar_reader_configuration_set_subscription_role_prefix(
84 pulsar_reader_configuration_t *configuration,
const char *subscriptionRolePrefix);
86PULSAR_PUBLIC
const char *pulsar_reader_configuration_get_subscription_role_prefix(
87 pulsar_reader_configuration_t *configuration);
89PULSAR_PUBLIC
void pulsar_reader_configuration_set_read_compacted(
90 pulsar_reader_configuration_t *configuration,
int readCompacted);
92PULSAR_PUBLIC
int pulsar_reader_configuration_is_read_compacted(pulsar_reader_configuration_t *configuration);
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);
97PULSAR_PUBLIC pulsar_consumer_crypto_failure_action
98pulsar_reader_configuration_get_crypto_failure_action(pulsar_reader_configuration_t *configuration);
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);