jondot / sneakers

A fast background processing framework for Ruby and RabbitMQ

Home Page:https://github.com/jondot/sneakers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Channel shared between threads for MaxRetry handler

oostashchenko-leobit opened this issue · comments

I am very pleased with a solution of retry mechanism this gem provides. Unfortunately there is no documentation for that part and maybe i am missing something.

MaxRetry handler on initialize declares exchanges and queues, i guess this is fine to be performed on the same channel, as we do this on initialization and most likely those already exist.

From other issues i understood that Sneakers utilizes single channel across multiple threads, because it is safe to do so in case of delivery processing (ack/reject). But MaxRetry handler, once it is exhausted, publishes new message to error exchange, and it does so on same channel.

Won't it introduce corrupted messages/errors due to the fact of same channel usage?