Sha256: ea8fa6c6a7a46ade447a27b2746f4ba5ecab5fc385946a6697a975ca180a3535
Contents?: true
Size: 468 Bytes
Versions: 13
Compression:
Stored size: 468 Bytes
Contents
require 'kafka/producer' module Kafka class Producer def produce2(value, key: nil, topic:, partition: nil, partition_key: nil) create_time = Time.now message = PendingMessage.new( value, key, topic, partition, partition_key, create_time, key.to_s.bytesize + value.to_s.bytesize ) @target_topics.add(topic) @pending_message_queue.write(message) nil end end end
Version data entries
13 entries across 13 versions & 1 rubygems