19 #ifndef PULSAR_PRODUCERCONFIGURATION_H_
20 #define PULSAR_PRODUCERCONFIGURATION_H_
21 #include <pulsar/CompressionType.h>
22 #include <pulsar/MessageRoutingPolicy.h>
23 #include <pulsar/Result.h>
24 #include <pulsar/Message.h>
26 #include <pulsar/ProducerCryptoFailureAction.h>
27 #include <pulsar/CryptoKeyReader.h>
28 #include <pulsar/Schema.h>
32 #pragma GCC visibility push(default)
36 typedef std::function<void(
Result,
const Message& msg)> SendCallback;
37 typedef std::function<void(
Result)> CloseCallback;
39 class ProducerConfigurationImpl;
47 enum PartitionsRoutingMode
50 RoundRobinDistribution,
66 const std::string& getProducerName()
const;
88 int getSendTimeout()
const;
91 int64_t getInitialSequenceId()
const;
107 CompressionType getCompressionType()
const;
110 int getMaxPendingMessages()
const;
129 PartitionsRoutingMode getPartitionsRoutingMode()
const;
132 const MessageRoutingPolicyPtr& getMessageRouterPtr()
const;
135 HashingScheme getHashingScheme()
const;
138 bool getBlockIfQueueFull()
const;
142 const bool& getBatchingEnabled()
const;
145 const unsigned int& getBatchingMaxMessages()
const;
148 const unsigned long& batchingMaxAllowedSizeInBytes);
149 const unsigned long& getBatchingMaxAllowedSizeInBytes()
const;
152 const unsigned long& getBatchingMaxPublishDelayMs()
const;
154 const CryptoKeyReaderPtr getCryptoKeyReader()
const;
157 ProducerCryptoFailureAction getCryptoFailureAction()
const;
160 std::set<std::string>& getEncryptionKeys();
161 bool isEncryptionEnabled()
const;
179 const std::string&
getProperty(
const std::string& name)
const;
199 friend class PulsarWrapper;
203 std::shared_ptr<ProducerConfigurationImpl> impl_;
206 #pragma GCC visibility pop