第3章 Using the command line interface


The command line interface (CLI) allows interaction with the message broker by use of an interactive shell. You can manage broker actions, configure messages, add users and roles to files and enter other useful commands by using the CLI.

You can use the CLI to interact with the broker in a Bash or Zsh shell, or a custom artemis shell. The same commands are available in each shell. By default, the artemis shell has built-in auto-completion of commands and command parameters. You can add auto-completion of the CLI commands and command parameters to a Bash or Zsh shell also.

3.1. Using the CLI in an artemis shell

The artemis shell interface provides auto-completion of commands and parameters that can be used with the artemis command. The shell also reuses the connection information provided, such as the broker URI and login credentials, for subsequent commands that you run in the same shell session.

Procedure

  1. Switch to the user account you created during installation, for example:

    $ su - amq-broker
  2. Use the artemis command to start the shell, for example:

    $ /var/opt/amq-broker/mybroker/bin/artemis

    If you want to supply the broker connection details when you start an artemis shell, use the artemis shell command. For example:

    $ /var/opt/amq-broker/mybroker/bin/artemis shell --user myuser --password mypassword --url tcp://localhost:61616

    The credentials and URI provided are reused for any subsequent command run in the shell that requires authentication with a broker.

  3. Press Tab to display auto-completion information anywhere in the shell. For example:

    • To display a list of commands available in the artemis shell, press Tab at the shell prompt.
    • To display sub-commands for a command, press Tab after the command. For example, type check and press Tab to display the sub-commands for the check command. The auto-completion information shows that the check command supports three sub-commands: cluster, node and queue.
    • To display auto-completion information for a sub-command, press Tab after the sub-command. For example, type check node and press Tab. If no further auto-completion information is displayed, type --, for example, check node --, and press Tab to display the parameters available for the command.
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

Red Hat ドキュメントについて

Legal Notice

Theme

© 2026 Red Hat
トップに戻る