twingly / twingly-amqp

:bus: Ruby gem for RabbitMQ subscribing and publishing
0 stars 0 forks source link

Use same consumer_threads default value as bunny #68

Closed roback closed 5 years ago

roback commented 5 years ago

The current default is 4 and was set in https://github.com/twingly/twingly-amqp/commit/bf696f20fccc52a2bf931c5f0b264807e09b95ba

A better default would be 1, which is what bunny defaults to: https://github.com/ruby-amqp/bunny/blob/f29c8b7deea72a04efbe81fd244a224757403d5f/lib/bunny/session.rb#L352

walro commented 5 years ago

A better default would be 1, which is what bunny defaults to: https://github.com/ruby-amqp/bunny/blob/f29c8b7deea72a04efbe81fd244a224757403d5f/lib/bunny/session.rb#L352

Their motivation:

Every channel maintains a fixed size thread pool used to dispatch deliveries (messages pushed by RabbitMQ to consumers). By default every pool has size of 1 to guarantee ordered message processing by default.

[Source]