4.5. Managing brokers using AMQ Management Console
You can use AMQ Management Console to view information about a running broker and manage the following resources:
- Incoming network connections (acceptors)
- Addresses
- Queues
4.5.1. Viewing details about the broker リンクのコピーリンクがクリップボードにコピーされました!
To see how the broker is configured, in the left menu, click Artemis. In the folder tree, the local broker is selected by default.
In the main pane, the following tabs are available:
StatusDisplays information about the current status of the broker, such as uptime and cluster information. Also displays the amount of address memory that the broker is currently using. The graph shows this value as a proportion of the
global-max-sizeconfiguration parameter.図4.2 Status tab
Connections- Displays information about broker connections, including client, cluster, and bridge connections.
Sessions- Displays information about all sessions currently open on the broker.
Consumers- Displays information about all consumers currently open on the broker.
Producers- Displays information about producers currently open on the broker.
Addresses- Displays information about addresses on the broker. This includes internal addresses, such as store-and-forward addresses.
Queues- Displays information about queues on the broker. This includes internal queues, such as store-and-forward queues.
Attributes- Displays detailed information about attributes configured on the broker.
Operations- Displays JMX operations that you can execute on the broker from the console. When you click an operation, a dialog box opens that enables you to specify parameter values for the operation.
Chart- Displays real-time data for attributes configured on the broker. You can edit the chart to specify the attributes that are included in the chart.
Broker diagram- Displays a diagram of the cluster topology. This includes all brokers in the cluster and any addresses and queues on the local broker.
4.5.2. Viewing the broker diagram リンクのコピーリンクがクリップボードにコピーされました!
You can view a diagram of all AMQ Broker resources in your topology, including brokers (live and backup brokers), producers and consumers, addresses, and queues.
Procedure
- In the left menu, click Artemis.
In the main pane, click the Broker diagram tab.
The console displays a diagram of the cluster topology. This includes all brokers in the cluster and any addresses and queues on the local broker, as shown in the figure.
図4.3 Broker diagram tab
- To change what items are displayed on the diagram, use the check boxes at the top of the diagram. Click Refresh.
To show attributes for the local broker or an address or queue that is connected to it, click that node in the diagram. For example, the following figure shows a diagram that also includes attributes for the local broker.
図4.4 Broker diagram tab, including attributes
4.5.3. Viewing acceptors リンクのコピーリンクがクリップボードにコピーされました!
You can view details about the acceptors configured for the broker.
Procedure
- In the left menu, click Artemis.
- In the folder tree, click acceptors.
To view details about how an acceptor is configured, click the acceptor.
The console shows the corresponding attributes on the Attributes tab, as shown in the figure.
図4.5 AMQP acceptor attributes
- To see complete details for an attribute, click the attribute. An additional window opens to show the details.
4.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.
4.5.4.1. Creating addresses リンクのコピーリンクがクリップボードにコピーされました!
A typical address is given a unique name, zero 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
- In the left menu, click Artemis.
- In the folder tree, click addresses.
In the main pane, click the Create address tab.
A page appears for you to create an address, as shown in the figure.
図4.6 Create Address page
Complete the following fields:
Address name- The routing name of the address.
Routing typeSelect one of the following options:
-
Multicast: Messages sent to the 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 not recommended.注記If an address does use both routing types, and the client does not show a preference for either one, the broker defaults to the
anycastrouting type. The one exception is when the client uses the MQTT protocol. In that case, the default routing type ismulticast.
-
- Click Create Address.
4.5.4.2. Sending messages to an address リンクのコピーリンクがクリップボードにコピーされました!
The following procedure shows how to use the console to send a message to an address.
Procedure
- In the left menu, click Artemis.
- In the folder tree, select an address.
On the navigation bar in the main pane, click
. A page appears for you to create a message, as shown in the figure.
図4.7 Send Message page
- By default messages are sent using the credentials that you used to log in to AMQ Management Console. If you want to use different credentials, clear the Use current logon user checkbox and specify values in the Username and Password fields, which are displayed after you clear the checkbox.
- If necessary, click the Add Header button to add message header information.
- Enter the message body.
- In the Format drop-down menu, select an option for the format of the message body, and then click Format. The message body is formatted in a human-readable style for the format you selected.
Click Send message.
The message is sent.
- To send additional messages, change any of the information you entered, and then click Send message.
4.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. To learn how to use the console to create an address, see 「Creating addresses」.
Procedure
- In the left menu, click Artemis.
- In the folder tree, select the address to which you want to bind the queue.
In the main pane, click the Create queue tab.
A page appears for you to create a queue, as shown in the figure.
図4.8 Create Queue page
Complete the following fields:
Queue name- A unique name for the queue.
Routing typeSelect one of the following options:
-
Multicast: Messages sent to the parent 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.
- Click Create Queue.
4.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
- In the left menu, click Artemis.
- In the folder tree, navigate to a queue.
In the main pane, click the Chart tab.
The console displays a chart that shows real-time data for all of the queue attributes.
図4.9 Chart tab for a queue
注記To view a chart for multiple queues on an address, select the
anycastormulticastfolder that contains the queues.If necessary, select different criteria for the chart:
- In the main pane, click Edit.
-
On the
Attributeslist, 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. - Click the View Chart button. The chart is updated based on the attributes that you selected.
4.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
- In the left menu, click Artemis.
In the folder tree, navigate to a queue.
Queues are located within the addresses to which they are bound.
On the navigation bar in the main pane, click
. The messages in the queue are displayed. By default, the first 200 messages are displayed.
図4.10 Browse Queue page
To browse for a specific message or group of messages, do one of the following:
Expand To… Do this… Filter the list of messages
In the
Filter…text field, enter filter criteria. Click the search (that is, magnifying glass) icon.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.
To view the content of a message, click the Show button.
You can view the message header, properties, and body.
4.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
- In the left menu, click Artemis.
- In the folder tree, navigate to a queue.
In the main pane, click the Send message tab.
A page appears for you to compose the message.
図4.11 Send Message page for a queue
- By default messages are sent using the credentials that you used to log in to AMQ Management Console. If you want to use different credentials, clear the Use current logon user checkbox and specify values in the Username and Password fields, which are displayed after you clear the checkbox.
- If necessary, click the Add Header button to add message header information.
- Enter the message body.
- In the Format drop-down menu, select an option for the format of the message body, and then click Format. The message body is formatted in a human-readable style for the format you selected.
- Click Send message. The message is sent.
- To send additional messages, change any of the information you entered, and click Send message.
4.5.4.7. Resending messages to a queue リンクのコピーリンクがクリップボードにコピーされました!
You can resend previously sent messages.
Procedure
- Browse for the message you want to resend.
- Click the check box next to the message that you want to resend.
- Click the Resend button. The message is displayed.
- Update the message header and body as needed, and then click Send message.
4.5.4.8. Moving messages to a different queue リンクのコピーリンクがクリップボードにコピーされました!
You can move one or more messages in a queue to a different queue.
Procedure
- Browse for the messages you want to move.
- Click the check box next to each message that you want to move.
In the navigation bar, click Move Messages.
A confirmation dialog box appears.
- From the drop-down menu, select the name of the queue to which you want to move the messages. Click Move.
4.5.4.9. Deleting messages or queues リンクのコピーリンクがクリップボードにコピーされました!
You can delete a queue or purge all of the messages from a queue.
Procedure
- Browse for the queue you want to delete or purge.
Do one of the following:
Expand To… Do this… Delete a message from the queue
- Click the check box next to each message that you want to delete.
- Click the Delete button.
Purge all messages from the queue
- On the navigation bar in the main pane, click Delete queue.
- Click the Purge Queue button.
Delete the queue
- On the navigation bar in the main pane, click Delete queue.
- Click the Delete Queue button.