Closed rpkilby closed 6 years ago
I've never used redislite
(though it looks pretty cool!) so I wouldn't really know. The biggest difference would be that the stub broker doesn't have any dependencies, but they should both behave the same.
I don't think I'd want to replace the stub broker with that combination, however, because it doesn't feel right to force someone who, for example, only uses the RMQ broker to also install Redis if he/she doesn't need it.
Definitely agree - the StubBroker
is a suitable testing alternative for RMQ users. Mostly just wanted to check if the StubBroker had any behavior differences or additional testing features that I would otherwise miss out on by using redislite.
Ah - the RedisBroker
does not have the flush
and flush_all
methods.
Right, but it doesn't really need them since you can just flush Redis directly.
That would presume that the user is familiar with redis and knows how to flush dramatiq's queues. Also, from a testing perspective the consistency would be helpful, as switching brokers wouldn't require rewriting how the broker is flushed.
Makes sense. I opened https://github.com/Bogdanp/dramatiq/issues/62 to track that as an enhancement.
During testing, what are the practical differences between the
StubBroker
and theRedisBroker
+redislite?