pulsar-client-cpp
Loading...
Searching...
No Matches
message.h
1
20#pragma once
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26#include <pulsar/defines.h>
27#include <stddef.h>
28#include <stdint.h>
29
30#include "string_map.h"
31
32typedef struct _pulsar_message pulsar_message_t;
33typedef struct _pulsar_message_id pulsar_message_id_t;
34
35PULSAR_PUBLIC pulsar_message_t *pulsar_message_create();
44PULSAR_PUBLIC void pulsar_message_copy(const pulsar_message_t *from, pulsar_message_t *to);
45PULSAR_PUBLIC void pulsar_message_free(pulsar_message_t *message);
46
48
49PULSAR_PUBLIC void pulsar_message_set_content(pulsar_message_t *message, const void *data, size_t size);
50
56PULSAR_PUBLIC void pulsar_message_set_allocated_content(pulsar_message_t *message, void *data, size_t size);
57
58PULSAR_PUBLIC void pulsar_message_set_property(pulsar_message_t *message, const char *name,
59 const char *value);
60
65PULSAR_PUBLIC void pulsar_message_set_partition_key(pulsar_message_t *message, const char *partitionKey);
66
71PULSAR_PUBLIC void pulsar_message_set_ordering_key(pulsar_message_t *message, const char *orderingKey);
72
76PULSAR_PUBLIC void pulsar_message_set_event_timestamp(pulsar_message_t *message, uint64_t eventTimestamp);
77
93PULSAR_PUBLIC void pulsar_message_set_sequence_id(pulsar_message_t *message, int64_t sequenceId);
94
100PULSAR_PUBLIC void pulsar_message_set_deliver_after(pulsar_message_t *message, uint64_t delayMillis);
101
108PULSAR_PUBLIC void pulsar_message_set_deliver_at(pulsar_message_t *message, uint64_t deliveryTimestampMillis);
109
120PULSAR_PUBLIC void pulsar_message_set_replication_clusters(pulsar_message_t *message, const char **clusters,
121 size_t size);
122
128PULSAR_PUBLIC void pulsar_message_disable_replication(pulsar_message_t *message, int flag);
129
131
138PULSAR_PUBLIC pulsar_string_map_t *pulsar_message_get_properties(pulsar_message_t *message);
139
147PULSAR_PUBLIC int pulsar_message_has_property(pulsar_message_t *message, const char *name);
148
155PULSAR_PUBLIC const char *pulsar_message_get_property(pulsar_message_t *message, const char *name);
156
163PULSAR_PUBLIC const void *pulsar_message_get_data(pulsar_message_t *message);
164
170PULSAR_PUBLIC uint32_t pulsar_message_get_length(pulsar_message_t *message);
171
181PULSAR_PUBLIC pulsar_message_id_t *pulsar_message_get_message_id(pulsar_message_t *message);
182
187PULSAR_PUBLIC const char *pulsar_message_get_partitionKey(pulsar_message_t *message);
188PULSAR_PUBLIC int pulsar_message_has_partition_key(pulsar_message_t *message);
189
194PULSAR_PUBLIC const char *pulsar_message_get_orderingKey(pulsar_message_t *message);
195PULSAR_PUBLIC int pulsar_message_has_ordering_key(pulsar_message_t *message);
196
201PULSAR_PUBLIC uint64_t pulsar_message_get_publish_timestamp(pulsar_message_t *message);
202
206PULSAR_PUBLIC uint64_t pulsar_message_get_event_timestamp(pulsar_message_t *message);
207
208PULSAR_PUBLIC const char *pulsar_message_get_topic_name(pulsar_message_t *message);
209
210PULSAR_PUBLIC int pulsar_message_get_redelivery_count(pulsar_message_t *message);
211
212PULSAR_PUBLIC int pulsar_message_has_schema_version(pulsar_message_t *message);
213
214PULSAR_PUBLIC const char *pulsar_message_get_schemaVersion(pulsar_message_t *message);
215
216PULSAR_PUBLIC void pulsar_message_set_schema_version(pulsar_message_t *message, const char *schemaVersion);
217
218#ifdef __cplusplus
219}
220#endif