Skip to content

Commit

Permalink
Adjust after merge, use ledgerID for get message by id
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikolajls committed Jan 10, 2025
1 parent c933c86 commit 4c58077
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/ctl/subscription/get_message_by_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ func doGetMessageByID(vc *cmdutils.VerbCmd, ledgerID int64, entryID int64) error
}

client := cmdutils.NewPulsarClient()
messages, err := client.Subscriptions().GetMessagesByID(*topic, legerID, entryID)
messages, err := client.Subscriptions().GetMessagesByID(*topic, ledgerID, entryID)
if err != nil {
return err
}
if len(messages) == 0 {
return fmt.Errorf("no message found with the given legerID and entryID")
return fmt.Errorf("no message found with the given ledgerID and entryID")
}
message := messages[0]
propertiesJSON, err := json.Marshal(message.GetProperties())
Expand Down

0 comments on commit 4c58077

Please sign in to comment.