Skip to content

Add producer wait strategies for capacity backoff#508

Open
svrohith9 wants to merge 1 commit intoLMAX-Exchange:masterfrom
svrohith9:feature/producer-wait-strategy
Open

Add producer wait strategies for capacity backoff#508
svrohith9 wants to merge 1 commit intoLMAX-Exchange:masterfrom
svrohith9:feature/producer-wait-strategy

Conversation

@svrohith9
Copy link

Summary

  • add producer-side wait strategy API and implementations
  • wire producer backoff into single/multi sequencers
  • add RingBuffer/Disruptor overloads and docs updates
  • add unit tests for producer wait strategies

Testing

  • ./gradlew test

@adacooke
Copy link
Contributor

adacooke commented Feb 5, 2026

Hi,
Thank you for your PR! Can I ask what the intended use case is for this feature? Generally the ring buffer being full is a really bad case and I don't know what use case would require configuring how that is handled.

@svrohith9
Copy link
Author

@adacooke Thanks! The goal isn’t to normalize the full buffer. Those are still a bad sign. But brief
ring‑full periods do happen (bursts, GC pauses, downstream hiccups). Today producers always
parkNanos(1), which hard‑codes one latency/CPU tradeoff. This change just lets apps choose a
different backoff policy for those short contention windows. Default behavior stays the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants