Sha256: be5763c68186d4d28d960875f8b57c81a6fba9261e65f336be97766cfc185363
Contents?: true
Size: 703 Bytes
Versions: 7
Compression:
Stored size: 703 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 ].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
7 entries across 7 versions & 1 rubygems