moleculerjs / moleculer-channels

Reliable messages for Moleculer services via external queue/channel/topic.
MIT License
75 stars 15 forks source link

Redis Adapter Capped Stream Support - "MAXLEN ~" #69

Closed valeeum closed 1 year ago

valeeum commented 1 year ago

Would be nice to be able to support creating capped streams using MAXLEN ~ when calling clientPub.xaddBuffer(...args) method.

https://redis.io/docs/data-types/streams-tutorial/#capped-streams

icebob commented 1 year ago

I've added it. https://github.com/moleculerjs/moleculer-channels/pull/70

Please try it before merging. I've tried but I don't experience any changes on Redis side

To try, install as npm i moleculerjs/moleculer-channels#xaddMaxLen

valeeum commented 1 year ago

sorry for the delayed response but it seems like it's working great.

valeeum commented 1 year ago

i pushed the code into a forgiving production workload so i will report back if i encounter any issues.

valeeum commented 1 year ago

@icebob everything is working as expected and can be merged into the master branch. thank you for this update!