Sha256: c0a884d076834eade53b329d0bbe5d395109806f746cbfd2d4f4eff2d8f8f921

Contents?: true

Size: 760 Bytes

Versions: 13

Compression:

Stored size: 760 Bytes

Contents

# frozen_string_literal: true

module Kafka
  class PendingMessage
    attr_reader :value, :key, :topic, :partition, :partition_key, :create_time, :bytesize

    def initialize(value, key, topic, partition, partition_key, create_time)
      @value = value
      @key = key
      @topic = topic
      @partition = partition
      @partition_key = partition_key
      @create_time = create_time
      @bytesize = key.to_s.bytesize + value.to_s.bytesize
    end

    def ==(other)
      @value == other.value &&
        @key == other.key &&
        @topic == other.topic &&
        @partition == other.partition &&
        @partition_key == other.partition_key &&
        @create_time == other.create_time &&
        @bytesize == other.bytesize
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ruby-kafka-0.6.8 lib/kafka/pending_message.rb
ruby-kafka-0.7.0.alpha4 lib/kafka/pending_message.rb
ruby-kafka-0.6.7 lib/kafka/pending_message.rb
ruby-kafka-0.6.6 lib/kafka/pending_message.rb
ruby-kafka-0.6.5 lib/kafka/pending_message.rb
ruby-kafka-0.6.4 lib/kafka/pending_message.rb
ruby-kafka-0.7.0.alpha3 lib/kafka/pending_message.rb
ruby-kafka-0.7.0.alpha2 lib/kafka/pending_message.rb
ruby-kafka-0.7.0.alpha1 lib/kafka/pending_message.rb
ruby-kafka-0.6.3 lib/kafka/pending_message.rb
ruby-kafka-0.6.2 lib/kafka/pending_message.rb
ruby-kafka-0.6.1 lib/kafka/pending_message.rb
ruby-kafka-0.6.0 lib/kafka/pending_message.rb