Skip to content

Commit 40db4fb

Browse files
Merge branch 'texpert-consume-without-binding'
2 parents ddf929a + e5955eb commit 40db4fb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/sneakers/queue.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ def subscribe(worker)
3939

4040
queue = @channel.queue(@name, **@opts[:queue_options])
4141

42-
if exchange_name.length > 0
42+
should_bind = @opts.fetch(:bind, true)
43+
if should_bind && exchange_name.length > 0
4344
routing_keys.each do |key|
4445
if @opts[:bind_arguments]
4546
queue.bind(@exchange, routing_key: key, arguments: @opts[:bind_arguments])

0 commit comments

Comments
 (0)