-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[pulsar-client] add pending-queue size metrics to producer stats #12674
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
Conversation
|
@rdhabalia:Thanks for your contribution. For this PR, do we need to update docs? |
9f529e3 to
010bba1
Compare
eolivelli
left a comment
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.
Lgtm
| ProducerBuilder<byte[]> producerBuilder = pulsarClient.newProducer() | ||
| .topic("persistent://my-property/tp1/my-ns/my-topic1"); | ||
|
|
||
| Producer<byte[]> producer = producerBuilder.enableBatching(false).create(); |
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.
What about adding @cleanup ?
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.
this test closes pulsarClient after every test method, which will also close and clean up producers/consumers. However, I just added the cleanup annotation.
| PulsarAdminTool.setAllowSystemExit(false); | ||
| PulsarAdminTool.main(new String[0]); | ||
| assertEquals(PulsarAdminTool.getLastExitCode(), 1); | ||
| assertEquals(PulsarAdminTool.getLastExitCode(), 0); |
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.
This change looks unrelated
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.
yes, it was for testing. created a separate PR: #12675
8ccf5a9 to
e46cefa
Compare
e46cefa to
33c79ac
Compare
eolivelli
left a comment
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.
LGTM
…che#12674) * [pulsar-client] add pending-queue size metrics to producer stats * fix test
Motivation
Add pending-queue size metrics to producer stats to create monitoring at client side and monitor various scenarios : timeout, high latency, memory, etc..
Modification
Add API
ProducerStats::getPendingQueueSizeto retrieve pending-queue size metrics for a producer.