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> 25 #include <boost/function.hpp> 26 #pragma GCC visibility push(default) 30 typedef boost::function<void(Result, const Message& msg)> SendCallback;
31 typedef boost::function<void(Result)> CloseCallback;
33 class ProducerConfigurationImpl;
41 enum PartitionsRoutingMode {
43 RoundRobinDistribution,
52 int getSendTimeout()
const;
55 CompressionType getCompressionType()
const;
58 int getMaxPendingMessages()
const;
61 PartitionsRoutingMode getPartitionsRoutingMode()
const;
64 const MessageRoutingPolicyPtr& getMessageRouterPtr()
const;
67 bool getBlockIfQueueFull()
const;
71 const bool& getBatchingEnabled()
const;
74 const unsigned int& getBatchingMaxMessages()
const;
77 const unsigned long& batchingMaxAllowedSizeInBytes);
78 const unsigned long& getBatchingMaxAllowedSizeInBytes()
const;
81 const unsigned long& batchingMaxPublishDelayMs);
82 const unsigned long& getBatchingMaxPublishDelayMs()
const;
84 friend class PulsarWrapper;
88 boost::shared_ptr<ProducerConfigurationImpl> impl_;
91 #pragma GCC visibility pop Definition: Authentication.h:31
Definition: ProducerConfiguration.h:39