An opinionated wrapper around KafkaProducer.
An opinionated wrapper around KafkaProducer.
Converts a map of options created by parsing PRODUCER_CLI_OPTIONS into a map of properties for the producer
Converts a map of options created by parsing PRODUCER_CLI_OPTIONS into a map of properties for the producer
(flush! prdcr)
Makes all buffered records immediately available to send (even if linger.ms is greater than 0) and blocks until complete.
Makes all buffered records immediately available to send (even if linger.ms is greater than 0) and blocks until complete.
A list of cli-option-specs to be used in conjunction with cli/parse-opts and with producer/extract-props-from-options.
A list of cli-option-specs to be used in conjunction with cli/parse-opts and with producer/extract-props-from-options.
Producer options defined and mapped into PRODUCER_DEFAULT_PROPS (used by producer function) and PRODUCER_CLI_OPTION_SPECS (which can be required for pairing with user-defined cli-options when).
Many options were skipped, I've only added ones that seem useful at this time.
For more detailed descriptions, see: https://kafka.apache.org/documentation/#producerconfigs
Producer options defined and mapped into PRODUCER_DEFAULT_PROPS (used by producer function) and PRODUCER_CLI_OPTION_SPECS (which can be required for pairing with user-defined cli-options when). Many options were skipped, I've only added ones that seem useful at this time. For more detailed descriptions, see: https://kafka.apache.org/documentation/#producerconfigs
The map of default properties created from PRODUCER_CONFIGURABLES
The map of default properties created from PRODUCER_CONFIGURABLES
(send! prdcr topic key value)
(send! prdcr topic partition key value)
Sends one message with value to the KafkaProducer prdcr on the String topic with the partition determined by key.
The type and then serialization of key and value are dictated by the producer properties key.serializer and value.serializer which are defaulted to StringSerializer and ByteArraySerializer respectively.
DOES NOT GUARANTEE A WRITE.
Returns a future which, after write happens, contains a RecordMetadata. To ensure write to topic, flush! must be called.
Sends one message with value to the KafkaProducer prdcr on the String topic with the partition determined by key. The type and then serialization of key and value are dictated by the producer properties key.serializer and value.serializer which are defaulted to StringSerializer and ByteArraySerializer respectively. DOES NOT GUARANTEE A WRITE. Returns a future which, after write happens, contains a RecordMetadata. To ensure write to topic, flush! must be called.
(send-and-flush-batch! prdcr messages)
Combines send! and flush! to send a batch of messages defined by a seq of maps that each have a :topic, :key, :value and optionally a :partition to put the message on.
Combines send! and flush! to send a batch of messages defined by a seq of maps that each have a :topic, :key, :value and optionally a :partition to put the message on.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close