|
pulsar-client-cpp
|
#include <ProducerConfiguration.h>
Public Types | |
| enum | PartitionsRoutingMode { UseSinglePartition, RoundRobinDistribution, CustomPartition } |
| enum | HashingScheme { Murmur3_32Hash, BoostHash, JavaStringHash } |
Public Member Functions | |
| ProducerConfiguration (const ProducerConfiguration &) | |
| ProducerConfiguration & | operator= (const ProducerConfiguration &) |
| ProducerConfiguration & | setProducerName (const std::string &producerName) |
| const std::string & | getProducerName () const |
| ProducerConfiguration & | setSchema (const SchemaInfo &schemaInfo) |
| const SchemaInfo & | getSchema () const |
| ProducerConfiguration & | setSendTimeout (int sendTimeoutMs) |
| int | getSendTimeout () const |
| ProducerConfiguration & | setInitialSequenceId (int64_t initialSequenceId) |
| int64_t | getInitialSequenceId () const |
| ProducerConfiguration & | setCompressionType (CompressionType compressionType) |
| CompressionType | getCompressionType () const |
| ProducerConfiguration & | setMaxPendingMessages (int maxPendingMessages) |
| int | getMaxPendingMessages () const |
| ProducerConfiguration & | setMaxPendingMessagesAcrossPartitions (int maxPendingMessagesAcrossPartitions) |
| int | getMaxPendingMessagesAcrossPartitions () const |
| ProducerConfiguration & | setPartitionsRoutingMode (const PartitionsRoutingMode &mode) |
| PartitionsRoutingMode | getPartitionsRoutingMode () const |
| ProducerConfiguration & | setMessageRouter (const MessageRoutingPolicyPtr &router) |
| const MessageRoutingPolicyPtr & | getMessageRouterPtr () const |
| ProducerConfiguration & | setHashingScheme (const HashingScheme &scheme) |
| HashingScheme | getHashingScheme () const |
| ProducerConfiguration & | setBlockIfQueueFull (bool) |
| bool | getBlockIfQueueFull () const |
| ProducerConfiguration & | setBatchingEnabled (const bool &batchingEnabled) |
| const bool & | getBatchingEnabled () const |
| ProducerConfiguration & | setBatchingMaxMessages (const unsigned int &batchingMaxMessages) |
| const unsigned int & | getBatchingMaxMessages () const |
| ProducerConfiguration & | setBatchingMaxAllowedSizeInBytes (const unsigned long &batchingMaxAllowedSizeInBytes) |
| const unsigned long & | getBatchingMaxAllowedSizeInBytes () const |
| ProducerConfiguration & | setBatchingMaxPublishDelayMs (const unsigned long &batchingMaxPublishDelayMs) |
| const unsigned long & | getBatchingMaxPublishDelayMs () const |
| const CryptoKeyReaderPtr | getCryptoKeyReader () const |
| ProducerConfiguration & | setCryptoKeyReader (CryptoKeyReaderPtr cryptoKeyReader) |
| ProducerCryptoFailureAction | getCryptoFailureAction () const |
| ProducerConfiguration & | setCryptoFailureAction (ProducerCryptoFailureAction action) |
| std::set< std::string > & | getEncryptionKeys () |
| bool | isEncryptionEnabled () const |
| ProducerConfiguration & | addEncryptionKey (std::string key) |
| bool | hasProperty (const std::string &name) const |
| const std::string & | getProperty (const std::string &name) const |
| std::map< std::string, std::string > & | getProperties () const |
| ProducerConfiguration & | setProperty (const std::string &name, const std::string &value) |
| ProducerConfiguration & | setProperties (const std::map< std::string, std::string > &properties) |
Friends | |
| class | PulsarWrapper |
Class that holds the configuration for a producer
| int pulsar::ProducerConfiguration::getMaxPendingMessagesAcrossPartitions | ( | ) | const |
| std::map<std::string, std::string>& pulsar::ProducerConfiguration::getProperties | ( | ) | const |
Get all the properties attached to this producer.
| const std::string& pulsar::ProducerConfiguration::getProperty | ( | const std::string & | name | ) | const |
Get the value of a specific property
| name | the name of the property |
| const SchemaInfo& pulsar::ProducerConfiguration::getSchema | ( | ) | const |
| bool pulsar::ProducerConfiguration::hasProperty | ( | const std::string & | name | ) | const |
Check whether the producer has a specific property attached.
| name | the name of the property to check |
| ProducerConfiguration& pulsar::ProducerConfiguration::setCompressionType | ( | CompressionType | compressionType | ) |
Set the compression type for the producer.
By default, message payloads are not compressed. Supported compression types are:
| ProducerConfiguration& pulsar::ProducerConfiguration::setMaxPendingMessagesAcrossPartitions | ( | int | maxPendingMessagesAcrossPartitions | ) |
Set the number of max pending messages across all the partitions
This setting will be used to lower the max pending messages for each partition (setMaxPendingMessages(int)), if the total exceeds the configured value.
| maxPendingMessagesAcrossPartitions |
| ProducerConfiguration& pulsar::ProducerConfiguration::setProperties | ( | const std::map< std::string, std::string > & | properties | ) |
Add all the properties in the provided map
| ProducerConfiguration& pulsar::ProducerConfiguration::setProperty | ( | const std::string & | name, |
| const std::string & | value | ||
| ) |
Sets a new property on the producer
| name | the name of the property |
| value | the associated value |
| ProducerConfiguration& pulsar::ProducerConfiguration::setSchema | ( | const SchemaInfo & | schemaInfo | ) |
Declare the schema of the data that will be published by this producer.
The schema will be checked against the schema of the topic, and it will fail if it's not compatible, though the client library will not perform any validation that the actual message payload are conforming to the specified schema.
For all purposes, this
| schemaInfo |
1.8.16