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은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동