Skip to content

Enqueueing (recovery aware) publishing #184

@michaelklishin

Description

@michaelklishin

Currently Bunny::Exchange#publish doesn't try to ensure the message is sent when network connection is down. We should investigate enqueueing messages locally
(possibly with a write-ahead log) and sending them out only when it's safe to do so.
Batching can be an option, too.

This is not a feature everybody needs, and it does not replace publisher confirms but it
can make it easier for people who cannot afford to lose a single message to build
publishers where message loss probability is significantly lower.

Some open questions:

  • If we choose to implement a WAL, what on-disk format should we use?
  • How do we not degrade throughput by a significant amount?
  • How do we synchronize recovery and this publisher? Will it be running in a separate thread?
  • Is an in-memory version practical/interesting? Apps are increasingly deployed into environments (e.g. PaaS) where local disk usage is limited, discouraged or even not an option. Plus memory is a finite resource: do we reject publishes when the buffer is full, keep the most recent N messages or do something else?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions