Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/action_subscriber/route.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class Route
:action,
:durable,
:exchange,
:exchange_durable,
:prefetch,
:queue,
:routing_key,
Expand All @@ -15,6 +16,7 @@ def initialize(attributes)
@action = attributes.fetch(:action)
@durable = attributes.fetch(:durable)
@exchange = attributes.fetch(:exchange).to_s
@exchange_durable = attributes.fetch(:exchange_durable)
@prefetch = attributes.fetch(:prefetch) { ::ActionSubscriber.config.prefetch }
@queue = attributes.fetch(:queue)
@routing_key = attributes.fetch(:routing_key)
Expand Down
2 changes: 1 addition & 1 deletion lib/action_subscriber/route_set.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def queues

def setup_queue(route)
channel = ::ActionSubscriber::RabbitConnection.subscriber_connection.create_channel
exchange = channel.topic(route.exchange)
exchange = channel.topic(route.exchange, :durable => route.exchange_durable)
queue = channel.queue(route.queue, :durable => route.durable)
queue.bind(exchange, :routing_key => route.routing_key)
queue
Expand Down
1 change: 1 addition & 0 deletions lib/action_subscriber/router.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ def self.draw_routes(&block)
:acknowledgements => false,
:durable => false,
:exchange => "events",
:exchange_durable => false
}.freeze

def default_routing_key_for(route_settings)
Expand Down