Closed film42 closed 1 year ago
I think the best solution is going to be a custom redis connection wrapper. I can reimplement the bb8_redis crate in the sidekiq lib to wrap the common commands used and set a namespace for each key. This may cause more allocations but it should be fairly swappable. I have a pretty broken branch with this implemented, and I'll have a PR up soon. cc @justmark
Thats fantastic. You have the only library for Sidekiq in Rust that supports Tokio + consumers. Can't wait to take it for a spin :)
This has been released, along with a bb8 upgrade, a new namespaced example, and a bunch more docs in the README in version 0.6.0.
Ruby uses
redis-namespace
to partition a single redis store among multiple apps using thedefault
queue. Technically namespaces are an anti-pattern because it's now possible to create many different queues; however, many companies (including the one I work for) is usingredis-namespace
with sidekiq. It's certainly a "if it ain't broke, don't fix it thing" so we haven't. Others too.I think we can add this in two places:
It would be easier to implement (1) but (2) would be preferred.