Sha256: a705402bc3075ff54e3794c046a0cf5703ec0a75d23bc2ccc28a5a219879ff45
Contents?: true
Size: 853 Bytes
Versions: 6
Compression:
Stored size: 853 Bytes
Contents
# frozen_string_literal: true class Freddy module Producers class ReplyProducer CONTENT_TYPE = 'application/json' def initialize(channel, logger) @logger = logger @exchange = channel.default_exchange end def produce(routing_key, payload, properties) span = Tracing.span_for_produce( @exchange, routing_key, payload, correlation_id: properties[:correlation_id] ) properties = properties.merge( routing_key: routing_key, content_type: CONTENT_TYPE ) Tracing.inject_tracing_information_to_properties!(properties) @exchange.publish Payload.dump(payload), properties ensure # We won't wait for a reply. Just finish the span immediately. span.finish end end end end
Version data entries
6 entries across 6 versions & 1 rubygems