blob: a571128371a8b8b2ac1e0eede6a665038b7da5bf [file] [view] [edit]
@PLUGIN@ SSH Commands
=====================
SYNOPSIS
--------
The plugin provides SSH commands for stream offset inspection and replay.
ACCESS
------
Administrators only. These commands require the ADMINISTRATE_SERVER global capability.
PREREQUISITES
-------------
Offset and replay commands require:
* `general.enableBrokerApi = true`
* `stream.enabled = true`
COMMANDS
--------
### offsets
Show current stream offsets for all consumers of a topic.
Usage:
```sh
ssh -p 29418 <user>@<host> events-rabbitmq offsets <topic>
```
Output fields:
* consumer: consumer identifier (`consumerId`)
* offset: current consumer offset
* last-updated: timestamp when offset was last updated
Notes:
* `consumerId` is primarily useful for correlation across repeated offset
calls and related log entries.
### replay
Replay events for a topic from a given offset.
Usage:
```sh
ssh -p 29418 <user>@<host> events-rabbitmq replay <topic> -- <offset>
```
Offset behavior:
* Non-negative offset: treated as absolute position.
* Negative offset: treated as relative to the current maximum offset for the topic.
* If relative calculation becomes negative, replay starts from offset 0.
On success, the command prints the resolved offset:
```
Replay started for topic <topic> from offset <resolved-offset>
```
The replay resets and recreates the subscriber for the topic. A subscriber for the topic must
already exist. The command exits with status `1` if the broker API is disabled, stream support is
disabled, or no subscriber is found for the topic.
SEE ALSO
--------
* [GET topics/{topic}/offsets](rest-api-topics-offsets-get.html)
* [POST topics/{topic}/replay](rest-api-replay-events.html)
* [Plugin Configuration](config.html)
GERRIT
------
Part of [Gerrit Code Review](../../../Documentation/index.html)