26#include <pulsar/c/message.h>
27#include <pulsar/c/result.h>
28#include <pulsar/defines.h>
31typedef struct _pulsar_producer pulsar_producer_t;
33typedef void (*pulsar_send_callback)(pulsar_result, pulsar_message_id_t *msgId,
void *ctx);
34typedef void (*pulsar_close_callback)(pulsar_result,
void *ctx);
35typedef void (*pulsar_flush_callback)(pulsar_result,
void *ctx);
40PULSAR_PUBLIC
const char *pulsar_producer_get_topic(pulsar_producer_t *producer);
45PULSAR_PUBLIC
const char *pulsar_producer_get_producer_name(pulsar_producer_t *producer);
63PULSAR_PUBLIC pulsar_result pulsar_producer_send(pulsar_producer_t *producer, pulsar_message_t *msg);
79PULSAR_PUBLIC
void pulsar_producer_send_async(pulsar_producer_t *producer, pulsar_message_t *msg,
80 pulsar_send_callback callback,
void *ctx);
94PULSAR_PUBLIC int64_t pulsar_producer_get_last_sequence_id(pulsar_producer_t *producer);
105PULSAR_PUBLIC pulsar_result pulsar_producer_close(pulsar_producer_t *producer);
114PULSAR_PUBLIC
void pulsar_producer_close_async(pulsar_producer_t *producer, pulsar_close_callback callback,
118PULSAR_PUBLIC pulsar_result pulsar_producer_flush(pulsar_producer_t *producer);
120PULSAR_PUBLIC
void pulsar_producer_flush_async(pulsar_producer_t *producer, pulsar_flush_callback callback,
123PULSAR_PUBLIC
void pulsar_producer_free(pulsar_producer_t *producer);
125PULSAR_PUBLIC
int pulsar_producer_is_connected(pulsar_producer_t *producer);