Repository navigation
Keep poll acknowledgements in a store and support long polling - #24
Merged
Merged
Conversation
An SsfPollAckStore holds what the poller owes the transmitter until a request carried it, in memory by default or in the new EASYSSF_POLL_ACK table, so a SET handled before a restart is acknowledged afterwards instead of delivered again; stop() flushes. setLongPolling(hold) keeps one request outstanding (RFC 8936, section 2.5), with a timeout per request and a polling thread instead of the scheduler; the Spring Boot starter picks the poll client in SsfTransmitterFactory.pollHttpClient. The in-memory stores lock with ReentrantLock, which does not pin virtual threads. Result limits go through the JDBC driver, and the stores are tested on MySQL as well as H2 and PostgreSQL. SsfPoller.setThreadFactory lets a framework create the polling thread Closes #23 Signed-off-by: Thomas Darimont <thomas.darimont@googlemail.com>
Two pollers on one TestTransmitter stream with a shared dedup and acknowledgement store, on H2, PostgreSQL and MySQL: a SET is handled once, and the acknowledgement or error report one instance could not deliver leaves with the next poll of the other. Signed-off-by: Thomas Darimont <thomas.darimont@googlemail.com>
easyssf.receiver.poll.pending-acks, tagged with the transmitter, registered when a poller starts through the new SsfReceiverMetrics.pollerStarted; the health details already showed the count. Signed-off-by: Thomas Darimont <thomas.darimont@googlemail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An SsfPollAckStore holds what the poller owes the transmitter until a request carried it, in memory by default or in the new EASYSSF_POLL_ACK table, so a SET handled before a restart is acknowledged afterwards instead of delivered again; stop() flushes. setLongPolling(hold) keeps one request outstanding (RFC 8936, section 2.5), with a timeout per request and a polling thread instead of the scheduler; the Spring Boot starter picks the poll client in SsfTransmitterFactory.pollHttpClient. The in-memory stores lock with ReentrantLock, which does not pin virtual threads. Result limits go through the JDBC driver, and the stores are tested on MySQL as well as H2 and PostgreSQL. SsfPoller.setThreadFactory lets a framework create the polling thread
Closes #23