-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #64: Rebind RELP connections after configurable amount of messages have been sent #66
Conversation
…en sent with it. Two new configuration parameters for rebinding.
perhaps this kind of kortemik@80b5ee1 could be used for a generic pool? |
src/main/java/com/teragrep/lsh_01/pool/IManagedRelpConnection.java
Outdated
Show resolved
Hide resolved
src/main/java/com/teragrep/lsh_01/pool/RebindableRelpConnection.java
Outdated
Show resolved
Hide resolved
src/main/java/com/teragrep/lsh_01/pool/RelpConnectionFactory.java
Outdated
Show resolved
Hide resolved
…reate new rebind tests
src/test/java/com/teragrep/lsh_01/util/CountingFrameDelegate.java
Outdated
Show resolved
Hide resolved
…e atleast once and not the connection itself. Change counter in CountingFrameDelegate to AtomicInteger.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
really nice work here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, I would add one extra test but approving as it is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still good
Two new configuration properties:
relp.rebindRequestAmount
with a default of one million andrelp.rebindEnabled
with the default value false.RelpConnectionPool keeps count of sent messages for each connection with a HashMap, and gives out a new connection when the
rebindRequestAmount
of sent messages is reached.