Skip to content

Add producer wait strategies for capacity backoff#508

Open
Rohith (svrohith9) wants to merge 1 commit into
LMAX-Exchange:masterfrom
svrohith9:feature/producer-wait-strategy
Open

Add producer wait strategies for capacity backoff#508
Rohith (svrohith9) wants to merge 1 commit into
LMAX-Exchange:masterfrom
svrohith9:feature/producer-wait-strategy

Conversation

@svrohith9

Copy link
Copy Markdown

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
Copy Markdown
Contributor

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
Copy Markdown
Author

Ada Cooke (@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