rabbitmq-streams - Man Page

RabbitMQ stream management tools

Synopsis

rabbitmq-streams[-q] [-s] [-l] [-n node] [-t timeout] command [command_options]

Description

rabbitmq-streams is a command line tool that provides commands used to manage streams, for example, add or delete stream replicas. See the RabbitMQ streams overview.

Options

-n node

Default node is "rabbit@target-hostname", where target-hostname is the local host. On a host named "myserver.example.com", the node name will usually be "rabbit@myserver" (unless RABBITMQ_NODENAME has been overridden). The output of "hostname -s" is usually the correct suffix to use after the "@" sign. See rabbitmq-server(8) for details of configuring a RabbitMQ node.

-q, --quiet

Quiet output mode is selected. Informational messages are reduced when quiet mode is in effect.

-s, --silent

Silent output mode is selected. Informational messages are reduced and table headers are suppressed when silent mode is in effect.

-t timeout, --timeout timeout

Operation timeout in seconds. Not all commands support timeouts. Default is infinity.

-l, --longnames

Must be specified when the cluster is configured to use long (FQDN) node names. To learn more, see the RabbitMQ Clustering guide

--erlang-cookie cookie

Shared secret to use to authenticate to the target node. Prefer using a local file or the RABBITMQ_ERLANG_COOKIE environment variable instead of specifying this option on the command line. To learn more, see the RabbitMQ CLI Tools guide

Commands

help

Displays general help and commands supported by rabbitmq-streams.

Replication

add_replica queue node --vhost virtual-host

Adds a stream replica on the given node.

Example:

rabbitmq-streams add_replica --vhost "a-vhost" "a-queue" "rabbit@new-node"

delete_replica queue node --vhost virtual-host

Removes a stream replica on the given node.

Example:

rabbitmq-streams delete_replica --vhost "a-vhost" "a-queue" "rabbit@decomissioned-node"

Monitoring, observability and health checks

stream_status stream --vhost virtual-host

Displays the status of a stream.

Example:

rabbitmq-streams stream_status --vhost "a-vhost" "a-stream"

Policies

set_stream_retention_policy stream policy --vhost virtual-host

Set the retention policy of a stream.

Example:

rabbitmq-streams set_stream_retention_policy --vhost "a-vhost" "a-stream" "a-policy"

Stream plugin

list_stream_connections [connectioninfoitem ...]

Returns stream protocol connection statistics.

The connectioninfoitem parameter is used to indicate which connection information items to include in the results. The column order in the results will match the order of the parameters. connectioninfoitem can take any value from the list that follows:

auth_mechanism

SASL authentication mechanism used, such as "PLAIN".

client_properties

Informational properties transmitted by the client during connection establishment.

conn_name

Readable name for the connection.

connected_at

Date and time this connection was established, as timestamp.

connection_state

Connection state; one of:

  • running

  • blocked

frame_max

Maximum frame size (bytes).

heartbeat

Negotiated heartbeat interval, in seconds.

host

Server hostname obtained via reverse DNS, or its IP address if reverse DNS failed or was disabled.

peer_cert_issuer

The issuer of the peer's SSL certificate, in RFC4514 form.

peer_cert_subject

The subject of the peer's SSL certificate, in RFC4514 form.

peer_cert_validity

The period for which the peer's SSL certificate is valid.

peer_host

Peer hostname obtained via reverse DNS, or its IP address if reverse DNS failed or was not enabled.

peer_port

Peer port.

port

Server port.

ssl

Boolean indicating whether the connection is secured with SSL.

ssl_cipher

SSL cipher algorithm (e.g. "aes_256_cbc").

ssl_hash

SSL hash function (e.g. "sha").

ssl_key_exchange

SSL key exchange algorithm (e.g. "rsa").

ssl_protocol

SSL protocol (e.g. "tlsv1").

subscriptions

Number of subscriptions (consumers) on the connection.

user

Username associated with the connection.

vhost

Virtual host name with non-ASCII characters escaped as in C.

If no connectioninfoitem are specified then only conn_name is displayed.

For example, this command displays the connection name and user for each connection:

rabbitmq-streams list_stream_connections conn_name user

list_stream_consumers [-p vhost] [consumerinfoitem ...]

Returns consumers attached to a stream.

The consumerinfoitem parameter is used to indicate which consumer information items to include in the results. The column order in the results will match the order of the parameters. consumerinfoitem can take any value from the list that follows:

connection_pid

Id of the Erlang process associated with the consumer connection.

credits

Available credits for the consumer.

messages_consumed

Number of messages the consumer consumed.

offset

The offset (location in the stream) the consumer is at.

offset_lag

The difference between the last stored offset and the last dispatched offset for the consumer.

properties

The properties of the consumer subscription.

stream

The stream the consumer is attached to.

subscription_id

The connection-scoped ID of the consumer.

If no consumerinfoitem are specified then connection_pid, subscription_id, stream, messages_consumed, offset, offset_lag, credits, properties are displayed.

For example, this command displays the connection PID, subscription ID and stream for each consumer:

rabbitmq-streams list_stream_consumers connection_pid subscription_id stream

list_stream_publishers [-p vhost] [publisherinfoitem ...]

Returns registered publishers.

The publisherinfoitem parameter is used to indicate which publisher information items to include in the results. The column order in the results will match the order of the parameters. publisherinfoitem can take any value from the list that follows:

connection_pid

Id of the Erlang process associated with the consumer connection.

messages_confirmed

The number of confirmed messages for the publisher.

messages_errored

The number of errored messages for the publisher.

messages_published

The overall number of messages the publisher published.

publisher_id

The connection-scoped ID of the publisher.

reference

The deduplication reference of the publisher.

stream

The stream the publisher publishes to.

If no publisherinfoitem are specified then connection_pid, publisher_id, stream, reference, messages_published, messages_confirmed, and messages_errored are displayed.

For example, this command displays the connection PID, publisher ID and stream for each producer:

rabbitmq-streams list_stream_publishers connection_pid publisher_id stream

See Also

rabbitmqctl(8), rabbitmq-diagnostics(8), rabbitmq-server(8), rabbitmq-queues(8), rabbitmq-upgrade(8), rabbitmq-service(8), rabbitmq-env.conf(5), rabbitmq-echopid(8)

Author

The RabbitMQ Team <info@rabbitmq.com>

Referenced By

rabbitmqctl(8), rabbitmq-diagnostics(8), rabbitmq-env.conf(5), rabbitmq-plugins(8), rabbitmq-queues(8), rabbitmq-server(8), rabbitmq-service(8), rabbitmq-upgrade(8).

September 20, 2022