Skip to content

cli support for getting last message id of a topic#3251

Merged
sijie merged 1 commit intoapache:masterfrom
legendtkl:feature/cli/last-message-id
Dec 26, 2018
Merged

cli support for getting last message id of a topic#3251
sijie merged 1 commit intoapache:masterfrom
legendtkl:feature/cli/last-message-id

Conversation

@legendtkl
Copy link
Contributor

Just as @sijie said in #3243 ,

"typically for a given rest endpoint, it should be documented for 3 parts, 1) http rest api 2) pulsar-admin 3) admin java api. Can you follow what other endpoints do?"

This pr is add cli support to get last message id of a topic

  1. add cli support for api: /admin/v2/persistent/{tenant}/{namespace}/{topic}/lastMessageId
  2. the cli command is like: ./pulsar-admin topics last-message-id topic-name

Test Result:

➜  bin ./pulsar-admin topics last-message-id persistent://public/default/my-topic
{
  "ledgerId" : 10,
  "entryId" : -1,
  "partitionIndex" : -1
}
➜  bin ./pulsar-admin topics last-message-id persistent://public/default/my-topi
Topic not found

Reason: Topic not found

1. add cli support for api: /admin/v2/persistent/{tenant}/{namespace}/{topic}/lastMessageId
2. the cli command is like: ./pulsar-admin topics last-message-id topic-name
@sijie sijie added type/feature The PR added a new feature or issue requested a new feature area/cli labels Dec 25, 2018
@sijie sijie added this to the 2.3.0 milestone Dec 25, 2018
@sijie sijie merged commit 94a9423 into apache:master Dec 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cli type/feature The PR added a new feature or issue requested a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants