class Object

Constants

IDispatcher
IRoom
ITopic

Public Instance Methods

createTopic(name:, routing: topic = nil) click to toggle source
# File lib/postcard_rb/dispatchers/RabbitMQ/RabbitMQDispatcher.rb, line 39
def createTopic name:, routing:
  topic = nil

  case routing
  when Routing.Wide
    topic = WideRabbitMQTopic.new(name: name, channel: @channel)
  when Routing.Explicit
    topic = ExplicitRabbitMQTopic.new(name: name, channel: @channel)
  when Routing.PatternMatching
    topic = PatternMatchingRabbitMQTopic.new(name: name, channel: @channel)
  end

  @topics.push(topic)

  return topic
end