rabbitmq-delayed-message-exchange
rabbitmq-delayed-message-exchange copied to clipboard
DRAFT: dmx using khepri and RA
Proposed Changes
NOTE THE CODE IS NOT UP FOR REVIEW AT THIS POINT.
High level design:
- store msg metadata in khepri
- unique key
- time when to deliver msg
- Exchange info
- store msg binary in local KV storage
- Currently using leveled on each node
- Currently using RA to distribute the msg binary for local storage in KV store (not a good solution)
- Periodic check if any msg needs to be routed
- Check khepri for any keys with a time value that has passet its due time
- For each key, fetch the msg binary from local KV storage and route
- Delete entry
TODO:
- [ ] Have one process for accepting new DMXs and one process for periodically check for msg to route
- [ ] Use streams to distribute the msg binary for storage in local KV store (So we need a process that consumes the stream msg, stores it in the KV, and keeps track of the index
- [ ] Should all nodes do the check, and route msgs for queues they are the owner of?
- [ ] Figure out how to 'delete' a message in KV store in the cluster. (periodic clean?)
- [ ] Clean up the code heavily
- [ ] Tooling! More and better meta data
- [ ] Tooling! Inspect one or subset of messages.
- [ ] Tooling! Update and delete delayed messages
- [ ] Use Khepri PROJECTIONS?
Types of Changes
What types of changes does your code introduce to this project?
Put an x
in the boxes that apply
- [ ] Bug fix (non-breaking change which fixes issue #NNNN)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause an observable behavior change in existing systems)
- [ ] Documentation improvements (corrections, new content, etc)
- [ ] Cosmetic change (whitespace, formatting, etc)
Checklist
Put an x
in the boxes that apply. You can also fill these out after creating
the PR. If you're unsure about any of them, don't hesitate to ask on the
mailing list. We're here to help! This is simply a reminder of what we are
going to look for before merging your code.
- [ ] I have read the
CONTRIBUTING.md
document - [ ] I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
- [ ] All tests pass locally with my changes
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] I have added necessary documentation (if appropriate)
- [ ] Any dependent changes have been merged and published in related repositories
Further Comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc.