19#ifndef PULSAR_PRODUCERCONFIGURATION_H_
20#define PULSAR_PRODUCERCONFIGURATION_H_
21#include <pulsar/CompressionType.h>
22#include <pulsar/CryptoKeyReader.h>
23#include <pulsar/Message.h>
24#include <pulsar/MessageRoutingPolicy.h>
25#include <pulsar/ProducerCryptoFailureAction.h>
26#include <pulsar/ProducerInterceptor.h>
27#include <pulsar/Result.h>
28#include <pulsar/Schema.h>
29#include <pulsar/defines.h>
36typedef std::function<void(
Result,
const MessageId& messageId)> SendCallback;
37typedef std::function<void(
Result)> CloseCallback;
39struct ProducerConfigurationImpl;
47 enum PartitionsRoutingMode
50 RoundRobinDistribution,
104 ExclusiveWithFencing = 3
380 const unsigned long& batchingMaxAllowedSizeInBytes);
544 const std::vector<ProducerInterceptorPtr>& getInterceptors()
const;
547 std::shared_ptr<ProducerConfigurationImpl> impl_;
549 friend class PulsarWrapper;
550 friend class ConsumerImpl;
551 friend class ProducerImpl;
Definition ProducerConfiguration.h:45
const std::string & getProperty(const std::string &name) const
const SchemaInfo & getSchema() const
ProducerConfiguration & setBatchingMaxMessages(const unsigned int &batchingMaxMessages)
ProducerConfiguration & setSendTimeout(int sendTimeoutMs)
ProducerConfiguration & setAccessMode(const ProducerAccessMode &accessMode)
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)
ProducerAccessMode getAccessMode() const
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)
bool isChunkingEnabled() const
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
ProducerAccessMode
Definition ProducerConfiguration.h:84
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
ProducerConfiguration & setChunkingEnabled(bool chunkingEnabled)
BatchingType
Definition ProducerConfiguration.h:60
@ DefaultBatching
Definition ProducerConfiguration.h:70
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:31
Result
Definition Result.h:32