jondot/sneakers

[Question] ELI5 - how does 'threads' and 'prefetch' works in sneakers?

zulhfreelancer opened this issue · 0 comments

I'm new to RabbitMQ and sneakers gem. I read the Wiki and I saw 'threads' and 'prefetch' config.

I don't really get how they worked in sneakers and what's the best value should be set in my environment.

Currently I set the 'threads' to 2 and leave the 'prefetch' to default (not sure what's the default really). Upon launching sneakers process (bundle exec rake sneakers:run), my RabbitMQ server was steady and healthy.

Leaving that sneakers process running in terminal A, I ran rails s in terminal B and I quickly noticed my RabbitMQ server became unhealthy and took a while to get back to healthy state again.

  • Does this behaviour relates to 'threads' and 'prefetch' config in my sneakers initializer file?
  • Does these two config may affect the RabbitMQ health/performance?