19#ifndef PULSAR_PRODUCERCONFIGURATION_H_
20#define PULSAR_PRODUCERCONFIGURATION_H_
21#include <pulsar/defines.h>
22#include <pulsar/CompressionType.h>
23#include <pulsar/MessageRoutingPolicy.h>
24#include <pulsar/Result.h>
25#include <pulsar/Message.h>
27#include <pulsar/ProducerCryptoFailureAction.h>
28#include <pulsar/CryptoKeyReader.h>
29#include <pulsar/Schema.h>
35typedef std::function<void(
Result,
const MessageId& messageId)> SendCallback;
36typedef std::function<void(
Result)> CloseCallback;
38struct ProducerConfigurationImpl;
46 enum PartitionsRoutingMode
49 RoundRobinDistribution,
356 const unsigned long& batchingMaxAllowedSizeInBytes);
476 friend class PulsarWrapper;
480 std::shared_ptr<ProducerConfigurationImpl> impl_;
Definition: ProducerConfiguration.h:44
const std::string & getProperty(const std::string &name) const
const SchemaInfo & getSchema() const
ProducerConfiguration & setBatchingMaxMessages(const unsigned int &batchingMaxMessages)
ProducerConfiguration & setSendTimeout(int sendTimeoutMs)
const unsigned int & getBatchingMaxMessages() const
bool isEncryptionEnabled() const
ProducerConfiguration & setBatchingMaxPublishDelayMs(const unsigned long &batchingMaxPublishDelayMs)
ProducerConfiguration & setCompressionType(CompressionType compressionType)
bool getBlockIfQueueFull() const
std::map< std::string, std::string > & getProperties() const
const CryptoKeyReaderPtr getCryptoKeyReader() const
ProducerConfiguration & setProperties(const std::map< std::string, std::string > &properties)
const std::string & getProducerName() const
ProducerConfiguration & setHashingScheme(const HashingScheme &scheme)
const std::set< std::string > & getEncryptionKeys() const
ProducerConfiguration & addEncryptionKey(std::string key)
int getSendTimeout() const
CompressionType getCompressionType() const
ProducerConfiguration & setPartitionsRoutingMode(const PartitionsRoutingMode &mode)
ProducerConfiguration & setCryptoKeyReader(CryptoKeyReaderPtr cryptoKeyReader)
const unsigned long & getBatchingMaxAllowedSizeInBytes() const
bool hasProperty(const std::string &name) const
const MessageRoutingPolicyPtr & getMessageRouterPtr() const
ProducerConfiguration & setProducerName(const std::string &producerName)
ProducerCryptoFailureAction getCryptoFailureAction() const
ProducerConfiguration & setInitialSequenceId(int64_t initialSequenceId)
BatchingType getBatchingType() const
int64_t getInitialSequenceId() const
ProducerConfiguration & setProperty(const std::string &name, const std::string &value)
int getMaxPendingMessagesAcrossPartitions() const
ProducerConfiguration & setBatchingMaxAllowedSizeInBytes(const unsigned long &batchingMaxAllowedSizeInBytes)
HashingScheme getHashingScheme() const
ProducerConfiguration & setBatchingType(BatchingType batchingType)
ProducerConfiguration & setMessageRouter(const MessageRoutingPolicyPtr &router)
ProducerConfiguration & setMaxPendingMessagesAcrossPartitions(int maxPendingMessagesAcrossPartitions)
ProducerConfiguration & setCryptoFailureAction(ProducerCryptoFailureAction action)
bool getLazyStartPartitionedProducers() const
const unsigned long & getBatchingMaxPublishDelayMs() const
BatchingType
Definition: ProducerConfiguration.h:59
@ DefaultBatching
Definition: ProducerConfiguration.h:69
int getMaxPendingMessages() const
const bool & getBatchingEnabled() const
ProducerConfiguration & setBlockIfQueueFull(bool)
PartitionsRoutingMode getPartitionsRoutingMode() const
ProducerConfiguration & setMaxPendingMessages(int maxPendingMessages)
ProducerConfiguration & setLazyStartPartitionedProducers(bool)
ProducerConfiguration & setSchema(const SchemaInfo &schemaInfo)
ProducerConfiguration & setBatchingEnabled(const bool &batchingEnabled)
Definition: Authentication.h:30
Result
Definition: Result.h:31