Chapter 6. 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

6.1. Viewing Details about the Broker

You can 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

6.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.

6.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

6.4. Managing Addresses and Queues

6.4.1. Creating Addresses

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. However, 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.

6.4.2. Sending Messages 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.

6.4.3. Creating Queues

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

6.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.

6.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.

6.4.6. Sending Messages to a 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.

6.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.

6.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.

6.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

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.