-
Notifications
You must be signed in to change notification settings - Fork 210
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
Added message retries and acquire timer metrics #1841
Conversation
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.
nice PR! 🎉
@@ -131,6 +136,9 @@ private int calculateMessageDelay(long publishingMessageTimestamp) { | |||
*/ | |||
private void sendMessage(final Message message) { | |||
loadRecorder.recordSingleOperation(); | |||
HermesTimerContext acquireTimer = rateLimiterAcquireTimer.time(); |
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.
nit: maybe it should be moved to a separate method. What do you think?
private void acquireRateLimiter() {
HermesTimerContext acquireTimer = rateLimiterAcquireTimer.time();
rateLimiter.acquire();
acquireTimer.close();
}
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.
Moved to a separate method
@@ -131,6 +136,9 @@ private int calculateMessageDelay(long publishingMessageTimestamp) { | |||
*/ | |||
private void sendMessage(final Message message) { | |||
loadRecorder.recordSingleOperation(); | |||
HermesTimerContext acquireTimer = rateLimiterAcquireTimer.time(); | |||
rateLimiter.acquire(); |
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.
question: Does only ConsumerMessageSender
use the send
method from ResilientMessageSender
?
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.
Actually ConsumerMessageSender
use the send method from JettyBroadCastMessageSender
or SingleRecipientMessageSenderAdapter
depends on MessageSender
implementation provided by factory. True is, that those two classes which i have mentioned are the only usages of ResilientMessageSender.send()
What this PR contains: