Sha256: b47b5d3c1dad980c00b4cf9627d45fd18f39d0974779a8e37dbf5b7f86fa36f4
Contents?: true
Size: 576 Bytes
Versions: 5
Compression:
Stored size: 576 Bytes
Contents
class Freddy module Producers class ReplyProducer CONTENT_TYPE = 'application/json'.freeze def initialize(channel, logger) @logger = logger @exchange = channel.default_exchange end def produce(destination, payload, properties) Freddy.trace.log event: 'Sending response', queue: destination, payload: payload properties = properties.merge( routing_key: destination, content_type: CONTENT_TYPE ) @exchange.publish Payload.dump(payload), properties end end end end
Version data entries
5 entries across 5 versions & 2 rubygems