pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From si...@apache.org
Subject [pulsar] branch master updated: Document new rest api - getLastMessageId (#3243)
Date Wed, 26 Dec 2018 17:43:49 GMT
This is an automated email from the ASF dual-hosted git repository.

sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 7a31352  Document new rest api - getLastMessageId (#3243)
7a31352 is described below

commit 7a313524aa0f0159b443941b8ba8aa4e9ce83a2b
Author: legendtkl <taokelu@gmail.com>
AuthorDate: Thu Dec 27 01:43:44 2018 +0800

    Document new rest api - getLastMessageId (#3243)
    
    Fixes #3233
---
 site/docs/latest/admin-api/persistent-topics.md | 18 ++++++++++++++++++
 site2/docs/admin-api-persistent-topics.md       | 18 ++++++++++++++++++
 2 files changed, 36 insertions(+)

diff --git a/site/docs/latest/admin-api/persistent-topics.md b/site/docs/latest/admin-api/persistent-topics.md
index b254545..1928ab0 100644
--- a/site/docs/latest/admin-api/persistent-topics.md
+++ b/site/docs/latest/admin-api/persistent-topics.md
@@ -644,3 +644,21 @@ String topic = "persistent://my-tenant/my-namespace/my-topic";
 String subscriptionName = "my-subscription";
 admin.persistentTopics().deleteSubscription(topic, subscriptionName);
 ```
+
+#### Last Message Id
+
+It gives the last commited message ID for a persistent topic, and it will be available in
2.3.0.
+
+```shell
+pulsar-admin topics last-message-id topic-name
+```
+
+#### REST API
+{% endpoint Get /admin/v2/persistent/:tenant/:namespace/:topic/lastMessageId %}
+
+#### Java
+
+```Java
+String topic = "persistent://my-tenant/my-namespace/my-topic";
+admin.persistentTopics().getLastMessageId(topic);
+```
\ No newline at end of file
diff --git a/site2/docs/admin-api-persistent-topics.md b/site2/docs/admin-api-persistent-topics.md
index ef9d18f..4ff56df 100644
--- a/site2/docs/admin-api-persistent-topics.md
+++ b/site2/docs/admin-api-persistent-topics.md
@@ -602,3 +602,21 @@ String topic = "persistent://my-tenant/my-namespace/my-topic";
 String subscriptionName = "my-subscription";
 admin.persistentTopics().deleteSubscription(topic, subscriptionName);
 ```
+
+### Last Message Id
+
+It gives the last commited message ID for a persistent topic, and it will be available in
2.3.0.
+
+```shell
+pulsar-admin topics last-message-id topic-name
+```
+
+#### REST API
+{% endpoint Get /admin/v2/persistent/:tenant/:namespace/:topic/lastMessageId %}
+
+#### Java
+
+```Java
+String topic = "persistent://my-tenant/my-namespace/my-topic";
+admin.persistentTopics().getLastMessage(topic);
+```
\ No newline at end of file


Mime
View raw message