Sha256: 985a464f261cd198095a3d5d57c32feb859348748cf8b75f669f8c35fffb56b1
Contents?: true
Size: 774 Bytes
Versions: 11
Compression:
Stored size: 774 Bytes
Contents
# frozen_string_literal: true module Sbmt module KafkaConsumer module Instrumentation class BaseMonitor < Karafka::Instrumentation::Monitor # karafka consuming is based around batch-processing # so we need these per-message custom events SBMT_KAFKA_CONSUMER_EVENTS = %w[ consumer.consumed_one consumer.inbox.consumed_one consumer.consumed_batch consumer.process_message consumer.mark_as_consumed ].freeze def initialize super SBMT_KAFKA_CONSUMER_EVENTS.each { |event_id| notifications_bus.register_event(event_id) } end def instrument(_event_id, _payload = EMPTY_HASH, &block) super end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems