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

Version Path
fluent-plugin-kafka-0.4.2 lib/fluent/plugin/kafka_producer_ext.rb
fluent-plugin-kafka-0.4.2.rc1 lib/fluent/plugin/kafka_producer_ext.rb
fluent-plugin-kafka-0.4.1 lib/fluent/plugin/kafka_producer_ext.rb
fluent-plugin-kafka-0.4.0 lib/fluent/plugin/kafka_producer_ext.rb
fluent-plugin-kafka-0.4.0.rc1 lib/fluent/plugin/kafka_producer_ext.rb
fluent-plugin-kafka-0.3.5 lib/fluent/plugin/kafka_producer_ext.rb
fluent-plugin-kafka-0.3.4 lib/fluent/plugin/kafka_producer_ext.rb
fluent-plugin-kafka-0.3.3 lib/fluent/plugin/kafka_producer_ext.rb
fluent-plugin-kafka-0.3.2 lib/fluent/plugin/kafka_producer_ext.rb
fluent-plugin-kafka-0.3.1 lib/fluent/plugin/kafka_producer_ext.rb
fluent-plugin-kafka-0.3.0 lib/fluent/plugin/kafka_producer_ext.rb
fluent-plugin-kafka-0.3.0.rc1 lib/fluent/plugin/kafka_producer_ext.rb
fluent-plugin-kafka-0.2.2 lib/fluent/plugin/kafka_producer_ext.rb