Skip to content

Commit

Permalink
Add default config for exclusive consumer
Browse files Browse the repository at this point in the history
  • Loading branch information
anderslemke committed Mar 25, 2019
1 parent 6b7fdeb commit b81b6a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/sneakers/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class Configuration
:threads => 10,
:share_threads => false,
:ack => true,
:exclusive => false,
:heartbeat => 30,
:hooks => {},
:exchange => 'sneakers',
Expand Down
4 changes: 4 additions & 0 deletions spec/sneakers/worker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class DummyWorker
:arguments => { 'x-arg' => 'value' }
},
:ack => false,
:exclusive => true,
:threads => 50,
:prefetch => 40,
:exchange => 'dummy',
Expand Down Expand Up @@ -177,6 +178,7 @@ def work(msg)
:threads => 10,
:share_threads => false,
:ack => true,
:exclusive => false,
:amqp => "amqp://guest:guest@localhost:5672",
:vhost => "/",
:exchange => "sneakers",
Expand Down Expand Up @@ -215,6 +217,7 @@ def work(msg)
:threads => 50,
:share_threads => false,
:ack => false,
:exclusive => true,
:amqp => "amqp://guest:guest@localhost:5672",
:vhost => "/",
:exchange => "dummy",
Expand Down Expand Up @@ -253,6 +256,7 @@ def work(msg)
:threads => 10,
:share_threads => false,
:ack => true,
:exclusive => false,
:amqp => "amqp://guest:guest@localhost:5672",
:vhost => "/",
:exchange => "sneakers",
Expand Down

0 comments on commit b81b6a8

Please sign in to comment.