Class: PatternMatchingRabbitMQRoom

Inherits:
BaseRabbitMQRoom show all
Defined in:
lib/postcard_rb/dispatchers/RabbitMQ/routings/PatternMatching/PatternMatchingRabbitMQRoom.rb

Instance Method Summary collapse

Methods inherited from BaseRabbitMQRoom

#subscribe

Constructor Details

#initialize(name:, exclusive: false, autoDelete: false, channel:, exchange:) ⇒ PatternMatchingRabbitMQRoom

Returns a new instance of PatternMatchingRabbitMQRoom.



4
5
6
7
8
9
10
11
# File 'lib/postcard_rb/dispatchers/RabbitMQ/routings/PatternMatching/PatternMatchingRabbitMQRoom.rb', line 4

def initialize name:, exclusive: false, autoDelete: false, channel:, exchange:
  queueName = ""
  queueName = name if exclusive

  queue = channel.queue(queueName, :auto_delete => autoDelete).bind(exchange, :routing_key => name)

  super(channel: channel, queue: queue, exclusive: exclusive)
end