[pulsar-client] add pending-queue size metrics to producer stats#12674
Merged
Conversation
rdhabalia
requested review from
codelipenghui,
eolivelli,
jiazhai,
merlimat and
sijie
November 8, 2021 18:24
|
@rdhabalia:Thanks for your contribution. For this PR, do we need to update docs? |
rdhabalia
force-pushed
the
pending_stat
branch
from
November 8, 2021 19:00
9f529e3 to
010bba1
Compare
eolivelli
approved these changes
Nov 8, 2021
| ProducerBuilder<byte[]> producerBuilder = pulsarClient.newProducer() | ||
| .topic("persistent://my-property/tp1/my-ns/my-topic1"); | ||
|
|
||
| Producer<byte[]> producer = producerBuilder.enableBatching(false).create(); |
Contributor
Author
There was a problem hiding this comment.
this test closes pulsarClient after every test method, which will also close and clean up producers/consumers. However, I just added the cleanup annotation.
eolivelli
reviewed
Nov 8, 2021
| PulsarAdminTool.setAllowSystemExit(false); | ||
| PulsarAdminTool.main(new String[0]); | ||
| assertEquals(PulsarAdminTool.getLastExitCode(), 1); | ||
| assertEquals(PulsarAdminTool.getLastExitCode(), 0); |
Contributor
There was a problem hiding this comment.
This change looks unrelated
Contributor
Author
There was a problem hiding this comment.
yes, it was for testing. created a separate PR: #12675
rdhabalia
force-pushed
the
pending_stat
branch
from
November 8, 2021 22:54
8ccf5a9 to
e46cefa
Compare
codelipenghui
approved these changes
Nov 9, 2021
rdhabalia
force-pushed
the
pending_stat
branch
from
November 9, 2021 08:22
e46cefa to
33c79ac
Compare
eolivelli
pushed a commit
to eolivelli/pulsar
that referenced
this pull request
Nov 29, 2021
…che#12674) * [pulsar-client] add pending-queue size metrics to producer stats * fix test
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.
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.