Sha256: d8266902b4961ef4150dce6182df8e6902da758f75a57cc6fdea158368db5812
Contents?: true
Size: 859 Bytes
Versions: 18
Compression:
Stored size: 859 Bytes
Contents
# frozen_string_literal: true module Karafka module Consumers # Feature that allows us to use responders flow in consumer module Responders # Responds with given data using given responder. This allows us to have a similar way of # defining flows like synchronous protocols # @param data Anything we want to pass to responder based on which we want to trigger further # Kafka responding def respond_with(*data) Karafka.monitor.instrument( 'consumers.responders.respond_with', caller: self, data: data ) do # @note we build a new instance of responder each time, as a long-running (persisted) # consumers can respond multiple times during the lifecycle topic.responder.new(topic.parser).call(*data) end end end end end
Version data entries
18 entries across 18 versions & 1 rubygems