From c8cc7dc3b5fb607e5aed92398657b065054b3a74 Mon Sep 17 00:00:00 2001 From: momo-jun Date: Thu, 4 Aug 2022 21:56:36 +0800 Subject: [PATCH] Merge 2.8.1-specific docs from #11430, #11443, #11472, #11495, #11500 --- .../version-2.8.x/admin-api-topics.md | 43 +++++++++++++++++++ .../client-libraries-websocket.md | 2 +- .../version-2.8.x/reference-metrics.md | 6 +++ 3 files changed, 50 insertions(+), 1 deletion(-) diff --git a/site2/website/versioned_docs/version-2.8.x/admin-api-topics.md b/site2/website/versioned_docs/version-2.8.x/admin-api-topics.md index eb21b00757c7d..e7a2268a40151 100644 --- a/site2/website/versioned_docs/version-2.8.x/admin-api-topics.md +++ b/site2/website/versioned_docs/version-2.8.x/admin-api-topics.md @@ -709,6 +709,49 @@ admin.topics().getMessageById(topic, ledgerId, entryId); ```` +### Examine messages +You can examine a specific message on a topic by position relative to the earliest or the latest message. + +:::note + +This REST API is only available in 2.8.1 and later versions. + +::: + +````mdx-code-block + + + +```shell + +$ ./bin/pulsar-admin topics examine-messages \ + persistent://public/default/my-topic \ + -i latest -m 1 + +``` + + + + +{@inject: endpoint|GET|/admin/v2/:schema/:tenant/:namespace/:topic|operation/examineMessage?version=@pulsar:version_number@} + + + + +```java + +String topic = "persistent://my-tenant/my-namespace/my-topic"; +admin.topics().examineMessage(topic, "latest", 1); + +``` + + + + +```` + ### Skip messages You can skip a number of messages for a specific subscription of a given topic in the following ways. diff --git a/site2/website/versioned_docs/version-2.8.x/client-libraries-websocket.md b/site2/website/versioned_docs/version-2.8.x/client-libraries-websocket.md index bc13b437a97c1..54b2b2be13ed8 100644 --- a/site2/website/versioned_docs/version-2.8.x/client-libraries-websocket.md +++ b/site2/website/versioned_docs/version-2.8.x/client-libraries-websocket.md @@ -190,7 +190,7 @@ Key | Type | Required? | Explanation `maxRedeliverCount` | int | no | Define a [maxRedeliverCount](http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ConsumerBuilder.html#deadLetterPolicy-org.apache.pulsar.client.api.DeadLetterPolicy-) for the consumer (default: 0). Activates [Dead Letter Topic](https://github.com/apache/pulsar/wiki/PIP-22%3A-Pulsar-Dead-Letter-Topic) feature. `deadLetterTopic` | string | no | Define a [deadLetterTopic](http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ConsumerBuilder.html#deadLetterPolicy-org.apache.pulsar.client.api.DeadLetterPolicy-) for the consumer (default: {topic}-{subscription}-DLQ). Activates [Dead Letter Topic](https://github.com/apache/pulsar/wiki/PIP-22%3A-Pulsar-Dead-Letter-Topic) feature. `pullMode` | boolean | no | Enable pull mode (default: false). See "Flow Control" below. -`negativeAckRedeliveryDelay` | int | no | When a message is negatively acknowledged, it will be redelivered to the DLQ. +`negativeAckRedeliveryDelay` | int | no | When a message is negatively acknowledged, the delay time before the message is redelivered (in milliseconds). The default value is 60000. `token` | string | no | Authentication token, this is used for the browser javascript client NB: these parameter (except `pullMode`) apply to the internal consumer of the WebSocket service. diff --git a/site2/website/versioned_docs/version-2.8.x/reference-metrics.md b/site2/website/versioned_docs/version-2.8.x/reference-metrics.md index c3ffc2fabecb8..54e4508acf55c 100644 --- a/site2/website/versioned_docs/version-2.8.x/reference-metrics.md +++ b/site2/website/versioned_docs/version-2.8.x/reference-metrics.md @@ -127,6 +127,7 @@ All the namespace metrics are labelled with the following labels: | pulsar_throughput_in | Gauge | The total throughput of the namespace coming into this broker (bytes/second). | | pulsar_throughput_out | Gauge | The total throughput of the namespace going out from this broker (bytes/second). | | pulsar_storage_size | Gauge | The total storage size of the topics in this namespace owned by this broker (bytes). | +| pulsar_storage_logical_size | Gauge | The storage size (without replicas) of the topics in this namespace owned by this broker (bytes).
**Note:** This metric is only available in 2.8.1 and later versions. | | pulsar_storage_backlog_size | Gauge | The total backlog size of the topics of this namespace owned by this broker (messages). | | pulsar_storage_offloaded_size | Gauge | The total amount of the data in this namespace offloaded to the tiered storage (bytes). | | pulsar_storage_write_rate | Gauge | The total message batches (entries) written to the storage for this namespace (message batches / second). | @@ -169,6 +170,7 @@ All the topic metrics are labelled with the following labels: | pulsar_throughput_in | Gauge | The total throughput of the topic coming into this broker (bytes/second). | | pulsar_throughput_out | Gauge | The total throughput of the topic going out from this broker (bytes/second). | | pulsar_storage_size | Gauge | The total storage size of the topics in this topic owned by this broker (bytes). | +| pulsar_storage_logical_size | Gauge | The storage size (without replicas) of the topics in this namespace owned by this broker (bytes).
**Note:** This metric is only available in 2.8.1 and later versions. | | pulsar_storage_backlog_size | Gauge | The total backlog size of the topics of this topic owned by this broker (messages). | | pulsar_storage_offloaded_size | Gauge | The total amount of the data in this topic offloaded to the tiered storage (bytes). | | pulsar_storage_backlog_quota_limit | Gauge | The total amount of the data in this topic that limit the backlog quota (bytes). | @@ -235,6 +237,7 @@ All the managedLedger metrics are labelled with the following labels: | Name | Type | Description | | --- | --- | --- | | pulsar_ml_AddEntryBytesRate | Gauge | The bytes/s rate of messages added | +| pulsar_ml_AddEntryWithReplicasBytesRate | Gauge | The bytes/s rate of messages added with replicas.
**Note:** This metric is only available in 2.8.1 and later versions. | | pulsar_ml_AddEntryErrors | Gauge | The number of addEntry requests that failed | | pulsar_ml_AddEntryLatencyBuckets | Histogram | The latency of adding a ledger entry with a given quantile (threshold), including time spent on waiting in queue on the broker side
Available quantile:
| | pulsar_ml_AddEntryLatencyBuckets_OVERFLOW | Gauge | The number of times the AddEntryLatency is longer than 1 second | @@ -273,6 +276,9 @@ brk_ml_cursor_persistLedgerErrors(namespace="", ledger_name="", cursor_name:"")| brk_ml_cursor_persistZookeeperSucceed(namespace="", ledger_name="", cursor_name:"")|Gauge|The number of acknowledgment states that is persistent to ZooKeeper. brk_ml_cursor_persistZookeeperErrors(namespace="", ledger_name="", cursor_name:"")|Gauge|The number of ledger errors occurred when acknowledgment states fail to be persistent to ZooKeeper. brk_ml_cursor_nonContiguousDeletedMessagesRange(namespace="", ledger_name="", cursor_name:"")|Gauge|The number of non-contiguous deleted messages ranges. +brk_ml_cursor_writeLedgerSize(namespace="", ledger_name="", cursor_name:"")|Gauge|The size of write to ledger. **Note:** This metric is only available in 2.8.1 and later versions. +brk_ml_cursor_writeLedgerLogicalSize(namespace="", ledger_name="", cursor_name:"")|Gauge|The size of write to ledger (accounting for without replicas). **Note:** This metric is only available in 2.8.1 and later versions. +brk_ml_cursor_readLedgerSize(namespace="", ledger_name="", cursor_name:"")|Gauge|The size of read from ledger. **Note:** This metric is only available in 2.8.1 and later versions. ### LoadBalancing metrics All the loadbalancing metrics are labelled with the following labels: