このコンテンツは選択した言語では利用できません。

Chapter 2. Using AMQ Console


AMQ Console is a web console included in the AMQ Broker installation that enables you to use a web browser to manage AMQ Broker.

AMQ Console is based on hawtio.

2.1. Overview

AMQ Broker is a full-featured, message-oriented middleware broker. It offers specialized queueing behaviors, message persistence, and manageability. It supports multiple protocols and client languages, freeing you to use many of your application assets.

AMQ Broker’s key features allow you to:

  • monitor your AMQ brokers and clients

    • view the topology
    • view network health at a glance
  • manage AMQ brokers using:

    • AMQ Console
    • Command-line Interface (CLI)
    • Management API

The supported web browsers for AMQ Console are Firefox, Chrome, and Internet Explorer. For more information on supported browser versions, see AMQ 7 Supported Configurations.

2.2. Accessing AMQ Console

After installing AMQ Console, you can log in and connect to the brokers in your environment. Access AMQ Console through a single broker instance, regardless of how many brokers are installed in your environment.

Procedure

  1. Start the AMQ broker instances that you want to manage in AMQ Console.
  2. Navigate to the web console address for the broker instance that you started.

    Note

    The web console address is http://HOST:PORT/console/login. If you are using the default address, navigate to http://localhost:8161/console/login.

    AMQ Console Login Page
  3. Log in to AMQ Console using the default username and password that you created when you created the broker instance.

Additional resources

For more information on getting started with the broker, see Starting the broker in Getting Started with AMQ Broker.

2.3. Configuring AMQ Console

Configure user access and request access to resources on the broker.

2.3.1. Setting up user access to AMQ Console

You can access AMQ Console using the broker login credentials. The following table provides information about different methods to add additional broker users to access AMQ Console:

Authentication MethodDescription

Guest Authentication

Enables anonymous access. In this configuration, any user who connects without credentials or with the wrong credentials will be authenticated automatically and assigned a specific user and role.

For more information, see Enabling Guest Access in Configuring AMQ Broker.

Basic User and Password Authentication

For each user, you must define a username and password and assign a security role. Users can only log into AMQ Console using these credentials.

For more information, see Enabling Password Authentication in Configuring AMQ Broker.

LDAP Authentication

Users are authenticated and authorized by checking the credentials against user data stored in a central X.500 directory server.

For more information, see Adding Certificate-Based Authentication in Configuring AMQ Broker.

2.3.2. Securing AMQ Console and AMQ Broker connections

To allow AMQ Console to access resources on the broker, specify the permitted origin URLs that can access it by editing the allow-origin parameters in the access management configuration file on the broker.

Prerequisites

  • You must first upgrade to AMQ Broker 7.1.0, during which the access management configuration file named jolokia-access.xml is added to the broker instance. For more information about upgrading, see Upgrading a Broker instance from 7.0.x to 7.1.0.

Procedure

  1. Open the <broker-instance-dir>/etc/jolokia-access.xml file in a text editor.
  2. Within the <cors> section, edit the allow-origin settings to add each URL that you want to allow to access AMQ Console. For example:

    <cors>
       <!-- allow access to web console from localhost -->
       <allow-origin>https://localhost:8161/*</allow-origin>
       <!-- Check for the proper origin on the server side, too -->
       <strict-checking/>
    </cors>
  3. Save the file.

Additional resources

2.3.3. Securing network access to AMQ Console

To secure AMQ Console when it is being accessed over a WAN or the internet, use SSL to specify that network access uses https instead of http.

Prerequisites

The following should be located in the <broker-instance-dir>/etc/:

  • Java KeyStore (.jks)
  • Java TrustStore (only if you want to require client authentication)

Procedure

  1. Open the <broker-instance-dir>/etc/bootstrap.xml file.
  2. In the <web> element, add the following attributes:

    <web bind="https://localhost:8161"
        path="web"
        keyStorePath="<path_to_KeyStore>"
        keyStorePassword="<password>"
        clientAuth="<true/false>"
        trustStorePath="<path_to_TrustStore>"
        trustStorePassword="<password>">
        ...
    </web>
    AttributeDescription

    bind

    Change the URI scheme to https.

    keyStorePath

    The path of the KeyStore file. For example:

    keyStorePath="${artemis.instance}/etc/keystore.jks"

    keyStorePassword

    The KeyStore’s password.

    clientAuth

    Specifies whether client authentication is required. The default is false, but you can change it to true to enable authentication.

    trustStorePath

    The path of the TrustStore file. This attribute is only needed if clientAuth is true.

    trustStorePassword

    The TrustStore’s password.

2.4. Monitoring your AMQ Broker deployment

You can use the AMQ Console dashboard page to monitor the status of AMQ Broker. You can also create your own dashboards to display the real-time charts, diagrams, and metrics most important to you.

2.4.1. Viewing a dashboard

Dashboards provide you with real-time data about your AMQ Broker environment.

Procedure

  1. In AMQ Console, click the Dashboard tab.

    The Monitor dashboard appears, displaying real-time data about hawtio.

    AMQ Console Dashboard Page
  2. To switch to a different dashboard, click the dashboard tab.

2.4.2. Creating a new dashboard

Dashboards contain widgets, each of which can display a chart, diagram, or metrics. You can create as many dashboards as needed.

Procedure

  1. In AMQ Console, click the Dashboard tab.
  2. On the navigation bar, click Manage.

    Note

    The Manage page appears displaying a list of existing dashboards.

    AMQ Console Dashboard Manage
  3. Do one of the following:

    To…​Do this…​

    Create a new, blank dashboard

    Click Create.

    Create a dashboard similar to an existing dashboard

    1. Click the checkbox next to an existing dashboard.
    2. Click Duplicate.
  4. To change the name of the dashboard:

    1. Hover over the dashboard name and click the pencil icon ( Pencil Icon ).
    2. Enter a new name for the dashboard and then click the checkmark icon ( Checkmark Icon ).

2.4.3. Creating AMQ Broker dashboards

You can create new dashboards to display real-time data for AMQ Broker.

2.4.4. Adding AMQ Broker data to the AMQ Console dashboard

Add any of the available queue and topic charts to a dashboard.

Procedure

  1. Click the Artemis tab.
  2. On the navigation bar, click the add icon ( Add Chart to Dashboard Icon ).

    The Dashboard tab appears, displaying a list of available dashboards.

  3. Select the dashboard (or dashboards) which you want the chart to appear, and then click Add View To Dashboard. The chart is added to the dashboards you selected.

2.4.5. Changing the layout of a dashboard

Dashboards contain widgets, which display metrics, diagrams, and charts. You can change the way these widgets are displayed on a dashboard.

To…​Do this…​

Move or rearrange widgets

Click and drag a widget to a new position on the dashboard.

Change the title of a widget

  1. Hover over the widget’s title bar and click the edit icon ( Pencil Icon ).
  2. Enter a name for the widget and then click the checkmark icon ( Checkmark Icon ).

Resize a widget

In the bottom-right corner of the widget, click and drag the resize icon ( Resize Chart Icon ).

Remove a widget from the dashboard

In the widget’s title bar, click the close icon ( Close Icon ).

2.5. Managing AMQ Broker

You can use AMQ Console to view important information about AMQ Broker brokers and manage the following resources:

  • Incoming network connections (acceptors)
  • Addresses
  • Queues

2.5.1. Viewing details about the broker

View configuration properties and their values to see how the broker is configured.

Procedure

  • On the Artemis tab, in the folder tree, select a broker.

    A list of configuration properties are displayed for the broker.

    Connections
    Displays information about the client connections.
    Sessions
    Displays information about the client sessions.
    Consumers
    Displays information about the client consumers.
    Producers
    Displays information about the session producers.
    Addresses
    Displays information about the addresses.
    Queues
    Displays information about the queues.
    Diagrams
    Displays diagram of all AMQ Broker resources in your topology, including brokers (masters and slaves), producers and consumers, addresses, and queues.
    Attributes
    Displays information about the configured attributes.
    Operations
    Displays information about the operations that can be executed on the server.
    Chart
    Displays real-time data for the selected attributes.
AMQ Console Broker Attributes

2.5.2. Viewing the broker diagram

You can view a diagram of all AMQ Broker resources in your topology, including brokers (masters and slaves), producers and consumers, addresses, and queues.

Procedure

  1. On the Artemis tab, click Diagram.

    This example shows three brokers with 10 queues.

    AMQ Console Broker Diagram
  2. To change what objects are displayed on the diagram, click the View drop-down and select the items that you want to be displayed.

2.5.3. Viewing acceptors

You can view details about the acceptors configured for the broker.

Procedure

  1. On the Artemis tab, in the folder tree, expand the acceptors folder.
  2. Click an acceptor to view details about how it is configured.

    This example shows the configuration properties for the amqp acceptor, which is the default acceptor provided for the AMQP protocol:

    AMQ Console AMQP Acceptor Attributes

2.5.4. Managing addresses and queues

An address represents a messaging endpoint. Within the configuration, a typical address is given a unique name.

A queue is associated with an address. There can be multiple queues per address. Once an incoming message is matched to an address, the message is sent on to one or more of its queues, depending on the routing type configured. Queues can be configured to be automatically created and deleted.

2.5.4.1. Creating addresses

A typical address is given a unique name, 0 or more queues, and a routing type.

A routing type determines how messages are sent to the queues associated with an address. Addresses can be configured with two different routing types.

If you want your messages routed to…

Use this routing type…

A single queue within the matching address, in a point-to-point manner.

Anycast

Every queue within the matching address, in a publish-subscribe manner.

Multicast

You can create and configure addresses and queues, and then delete them when they are no longer in use.

Procedure

  1. In the folder tree, select a broker.
  2. On the navigation bar, click drop-down icon drop-down icon, and then click Create.

    A page appears for creating an address.

    AMQ Console Create Address
  3. Complete the following fields:

    Address name
    The routing name of the address.
    Routing type
    Select one of the following options:
    Multicast
    Messages sent to this address will be distributed to all subscribers in a publish-subscribe manner.
    Anycast
    Messages sent to this address will be distributed to only one subscriber in a point-to-point manner.
    Both
    Enables you to define more than one routing type per address. This typically results in an anti-pattern and is therefore not recommended.
    Note

    If an address does use both routing types, however, and the client does not show a preference for either one, the broker typically defaults to the anycast routing type. The one exception is when the client uses the MQTT protocol. In that case, the default routing type is multicast.

  4. Click Create Address.

2.5.4.2. Sending messages to an address

The following procedure outlines the steps required to send a message to an address.

Procedure

  1. In the folder tree, select an address.
  2. On the navigation bar, click drop-down icon drop-down icon, and then click Send.

    A page appears for you to compose the message.

    AMQ Console Send Message
  3. If necessary, click the Header button to add message header information.
  4. Enter the message body.
  5. In the Payload format drop-down, select an option for the format of the message body, and then click Auto format. The message body is formatted in a human-readable style for the format you selected.
  6. Click Send message. The message is sent.
  7. To send additional messages, change any of the information you entered, and then click Send message.

2.5.4.3. Creating queues

Queues provide a channel between a producer and a consumer.

Prerequisites

  • The address to which you want to bind the queue must exist.

Procedure

  1. In the folder tree, select the address to which you want to bind the queue.
  2. On the navigation bar, click drop-down icon drop-down icon, and then click Create.

    A page appears for you to create the queue.

    AMQ Console Create Queue
  3. Complete the following fields:

    Queue name
    A unique name for the queue.
    Routing type
    Select one of the following options:
    Multicast
    Messages sent to this address will be distributed to all queues bound to the address.
    Anycast
    Only one queue bound to the parent address will receive a copy of the message. Messages will be distributed evenly among all of the queues bound to the address.
    Durable
    If you select this option, the queue and its messages will be persistent.
    Filter
    The username to be used when connecting to the broker.
    Max Consumers
    The maximum number of consumers that can access the queue at a given time.
    Purge when no consumers
    If selected, the queue will be purged when no consumers are connected.
  4. Click Create Queue.

    The queue is created. You can access it in the folder tree under the address to which it is bound. Queues for an address are organized into a Queues folder. Within the Queues folder, queues are further organized by routing type (MULTICAST and ANYCAST).

    In this example, the clusterQueue queue is located within the clusterQueue address:

    AMQ Console Queue in Folder Tree

2.5.4.4. Checking the status of a queue

Charts provide a real-time view of the status of a queue on a broker.

Procedure

  1. In the folder tree, navigate to a queue.

    To view a chart for multiple queues for an address, select the ANYCAST or MULTICAST folder that contains the queues.

  2. On the navigation bar, click drop-down icon drop-down icon, and then click Chart.

    A chart is displayed showing real-time data for all of the queue’s attributes.

    AMQ Console Chart
  3. If necessary, select different criteria for the chart:

    1. On the navigation bar, click drop-down icon drop-down icon, and then click Edit Chart.
    2. In the Attributes list, select one or more attributes that you want to include in the chart. To select multiple attributes, press and hold the Ctrl key and select each attribute.
    3. Click the View Chart button. The chart is displayed based on the criteria you selected.

2.5.4.5. Browsing queues

Browsing a queue displays all of the messages in the queue. You can also filter and sort the list to find specific messages.

Procedure

  1. In the folder tree, navigate to a queue.

    Queues are located within the address to which they are bound.

  2. On the navigation bar, click drop-down icon drop-down icon, and then click Browse.

    The messages in the queue are displayed. By default, the first 200 messages are displayed.

    AMQ Console Browse Queue
  3. To browse for a specific message or group of messages, do one of the following:

    To…​Do this…​

    Filter the list of messages

    In the Filter messages text field, enter a filter criteria and then press Enter.

    Sort the list of messages

    In the list of messages, click a column header. To sort the messages in descending order, click the header a second time.

  4. To view the content of a message, click the message ID.

    You can view the message header, properties, and body.

2.5.4.6. Sending messages to a queue

After creating a queue, you can send a message to it. The following procedure outlines the steps required to send a message to an existing queue.

Procedure

  1. In the folder tree, select the queue to which you want to send the message.
  2. On the navigation bar, click drop-down icon drop-down icon, and then click Send.

    A page appears for you to compose the message.

    AMQ Console Send Message to a Queue
  3. If necessary, click the Header button to add message header information.
  4. Enter the message body.
  5. In the Payload format drop-down, select an option for the format of the message body, and then click Auto format. The message body is formatted in a human-readable style for the format you selected.
  6. Click Send message. The message is sent.
  7. To send additional messages, change any of the information you entered, and click Send message.

2.5.4.7. Resending messages to a queue

You can resend previously sent messages.

Procedure

  1. Browse for the message you want to resend.
  2. Click the checkbox next to the message that you want to resend.
  3. Click the Resend button. The message is displayed.
  4. Update the message header and body as needed, and then click Send message.

2.5.4.8. Moving messages to a different queue

You can move one or more messages in a queue to a different queue.

Procedure

  1. Browse for the messages you want to move.
  2. Click the checkbox next to each message that you want to move.
  3. Click the Move button.

    A confirmation dialog box appears.

    AMQ Console Move Message
  4. Enter the name of the queue to which you want to move the messages, and then click Move.

2.5.4.9. Deleting queues

You can delete a queue or purge all of the messages from a queue.

Procedure

  1. Browse for the queue you want to delete or purge.
  2. Do one of the following:

    To…​Do this…​

    Delete a message from the queue

    1. Click the checkbox next to each message you want to delete.
    2. Click the Delete button.

    Purge all messages from the queue

    1. On the navigation bar, click Delete.
    2. Click the Purge queue button.

    Delete the queue

    1. On the navigation bar, click Delete.
    2. Click the Delete queue button.
Red Hat logoGithubRedditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

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

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。

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

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

会社概要

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

© 2024 Red Hat, Inc.