class
   Kafka::Producer
 
  - Kafka::Producer
 - Reference
 - Object
 
Defined in:
kafka/producer.crkafka/producer/delivery_report.cr
kafka/producer/statistics.cr
Constant Summary
- 
        DEFAULT_POLL_INTERVAL_SECONDS = 
5 
Constructors
Instance Method Summary
- 
        #finalize
        
          
Destroy the Kafka handle.
 - 
        #flush(timeout = 1000)
        
          
Wait until all outstanding produce requests, et.al, are completed.
 - 
        #poll(timeout = 500)
        
          
Polls the Kafka handle for events
 - 
        #produce(topic : String, key : Bytes, payload : Bytes, timestamp : Int64)
        
          
Produce and send a single message to broker.
 - 
        #produce(topic : String, key : Bytes, payload : Bytes)
        
          
Produce and send a single message to broker.
 - 
        #produce(topic : String, payload : Bytes)
        
          
Produce and send a single message to broker.
 - 
        #produce(topic : String, msg : Message)
        
          
Produce and send a single message to broker.
 - 
        #produce_batch(topic : String, batch : Array(NamedTuple(key: Array(UInt8), msg: Array(UInt8))))
        
          
Produce and send multiple messages to broker.
 
Constructor Detail
Instance Method Detail
Wait until all outstanding produce requests, et.al, are completed. This should typically be done prior to destroying a producer instance to make sure all queued and in-flight produce requests are completed before terminating.
Calls the rd_kafka_flush C function.
Polls the Kafka handle for events
An application should make sure to call #poll at regular intervals to serve any queued callbacks waiting to be called.
Produce and send a single message to broker.
Raises a Kafka::ProducerException when produce fails.
Calls the rd_kafka_producev C function.
Produce and send a single message to broker.
Raises a Kafka::ProducerException when produce fails.
Calls the rd_kafka_producev C function.
Produce and send a single message to broker.
Raises a Kafka::ProducerException when produce fails.
Calls the rd_kafka_producev C function.
Produce and send a single message to broker.
Raises a Kafka::ProducerException when produce fails.
Calls the rd_kafka_produce C function.
Produce and send multiple messages to broker.
Raises a Kafka::ProducerException when produce fails.
Calls the rd_kafka_produce C function.