Sha256: 740b4ae14db1c7f3e81b6a4778bd44234febdc76e078cbab47edf5e8d76a0c2d

Contents?: true

Size: 799 Bytes

Versions: 3

Compression:

Stored size: 799 Bytes

Contents

module Kafka
  class FetchedMessage

    # @return [String] the value of the message.
    attr_reader :value

    # @return [String] the key of the message.
    attr_reader :key

    # @return [String] the name of the topic that the message was written to.
    attr_reader :topic

    # @return [Integer] the partition number that the message was written to.
    attr_reader :partition

    # @return [Integer] the offset of the message in the partition.
    attr_reader :offset

    # @return [Time] the timestamp of the message.
    attr_reader :create_time

    def initialize(value:, key:, topic:, partition:, offset:, create_time:)
      @value = value
      @key = key
      @topic = topic
      @partition = partition
      @offset = offset
      @create_time = create_time
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ruby-kafka-0.5.0.beta4 lib/kafka/fetched_message.rb
ruby-kafka-0.5.0.beta3 lib/kafka/fetched_message.rb
ruby-kafka-0.5.0.beta2 lib/kafka/fetched_message.rb