class WideRabbitMQTopic
Public Class Methods
new(name:, channel: super())
click to toggle source
# File lib/postcard_rb/dispatchers/RabbitMQ/routings/Wide/WideRabbitMQTopic.rb, line 5 def initialize name:, channel: super() @channel = channel @exchange = @channel.fanout(name, :durable => false) end
Public Instance Methods
createRoom(name:, exclusive: false, autoDelete: false)
click to toggle source
# File lib/postcard_rb/dispatchers/RabbitMQ/routings/Wide/WideRabbitMQTopic.rb, line 12 def createRoom name:, exclusive: false, autoDelete: false room = WideRabbitMQRoom.new( name: name, exclusive: exclusive, autoDelete: autoDelete, channel: @channel, exchange: @exchange ) addRoom(room: room) return room end
publish(payload:, correlationId: nil, replyTo: nil)
click to toggle source
# File lib/postcard_rb/dispatchers/RabbitMQ/routings/Wide/WideRabbitMQTopic.rb, line 26 def publish payload:, correlationId: nil, replyTo: nil @exchange.publish( payload, :correlation_id => correlationId, :reply_to => replyTo, :persistent => false ) end