Sha256: 9c7aad6b4881c5033cee493f5d6b9a1a06caa544485da53dffc06ed3bf9bccd5
Contents?: true
Size: 808 Bytes
Versions: 19
Compression:
Stored size: 808 Bytes
Contents
# frozen_string_literal: true module Karafka module Messages # Single message metadata details that can be accessed without the need of deserialization. Metadata = Struct.new( :message, :timestamp, :offset, :deserializers, :partition, :received_at, :topic, :raw_headers, :raw_key, keyword_init: true ) do # @return [Object] deserialized key. By default in the raw string format. def key return @key if @key @key = deserializers.key.call(self) end # @return [Object] deserialized headers. By default its a hash with keys and payload being # strings def headers return @headers if @headers @headers = deserializers.headers.call(self) end end end end
Version data entries
19 entries across 19 versions & 1 rubygems