Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 9. Management
You can manage AMQ Interconnect using both graphical and command-line tools.
- AMQ Console
- A graphical tool for monitoring and managing AMQ brokers and routers.
- qdstat
- A command-line tool for monitoring the status of AMQ Interconnect routers.
- qdmanage
- A command-line tool for viewing and updating the configuration of AMQ Interconnect routers.
9.1. Using AMQ Console
If you prefer to use a graphic interface to manage AMQ, you can use AMQ Console. AMQ Console is a web console included in the AMQ Broker installation, and it enables you to use a web browser to manage AMQ Broker and AMQ Interconnect.
For more information, see Using AMQ Console.
9.2. Monitoring AMQ Interconnect Using qdstat
				You can use qdstat to view the status of routers on your router network. For example, you can view information about the attached links and configured addresses, available connections, and nodes in the router network.
			
9.2.1. Syntax for Using qdstat
					You can use qdstat with the following syntax:
				
qdstat OPTION [CONNECTION_OPTIONS] [SECURE_CONNECTION_OPTIONS]
$ qdstat OPTION [CONNECTION_OPTIONS] [SECURE_CONNECTION_OPTIONS]This specifies:
- 
							An optionfor the type of information to view.
- One or more optional - connection_optionsto specify a router for which to view the information.- If you do not specify a connection option, - qdstatconnects to the router listening on localhost and the default AMQP port (5672).
- 
							The secure_connection_optionsif the router for which you want to view information only accepts secure connections.
					For more information about qdstat, see the qdstat man page.
				
9.2.2. Viewing General Statistics for a Router
You can view information about a router in the router network, such as its working mode and ID.
Procedure
- Use the following command: - qdstat -g [CONNECTION_OPTIONS] - $ qdstat -g [CONNECTION_OPTIONS]- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - This example shows general statistics for the local router: - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
9.2.3. Viewing a List of Connections to a Router
You can view:
- Connections from clients (sender/receiver)
- Connections from and to other routers in the network
- Connections to other containers (such as brokers)
- Connections from the tool itself
Procedure
- Use this command: - qdstat -c [CONNECTION_OPTIONS] - $ qdstat -c [CONNECTION_OPTIONS]- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - For more information about the fields displayed by this command, see the qdstat -c output columns. - In this example, two clients are connected to - Router.A.- Router.Ais connected to- Router.Band a broker.- Viewing the connections on Router.A displays the following: - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- This connection shows thatRouter.Ais connected to a broker, because theroleisroute-container, and thedirisout.
- 2
- Router.Ais also connected to another router on the network (the- roleis- inter-router), establishing an output connection (the- diris- out).
- 3 4
- These connections show that two clients are connected toRouter.A, because theroleisnormal, and thedirisin.
- 5
- The connection fromqdstattoRouter.A. This is the connection thatqdstatuses to queryRouter.Aand display the command output.
 - Router.Ais connected to- Router.B. Viewing the connections on- Router.Bdisplays the following:- qdstat -c -r Router.B - $ qdstat -c -r Router.B Connections id host container role dir security authentication tenant ==================================================================================================== 1 localhost.localdomain:51848 Router.A inter-router in no-security anonymous-user- 1 - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- This connection shows thatRouter.Bis connected toRouter.Athrough an incoming connection (theroleisinter-routerand thedirisin). There is not a connection fromqdstattoRouter.B, because the command was run fromRouter.Aand forwarded toRouter.B.
 
9.2.4. Viewing AMQP Links Attached to a Router
You can view a list of AMQP links attached to the router from clients (sender/receiver), from or to other routers into the network, to other containers (for example, brokers), and from the tool itself.
Procedure
- Use this command: - qdstat -l [CONNECTION_OPTIONS] - $ qdstat -l [CONNECTION_OPTIONS]- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - For more information about the fields displayed by this command, see the qdstat -l output columns. - In this example, - Router.Ais connected to both- Router.Band a broker. A link route is configured for the- my_queuequeue and waypoint (with autolinks), and for the- my_queue_wpqueue on the broker. In addition, there is a receiver connected to- my_address(message routing based), another to- my_queue, and the a third one to- my_queue_wp.- In this configuration, the router uses only one connection to the broker for both the waypoints (related to - my_queue_wp) and the link route (related to- my_queue).- Viewing the links displays the following: - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- Theconn id2 connection has four links (in both directions) for inter-router communications withRouter.B, such as control messages and normal message-routed deliveries.
- 2
- There are two autolinks (conn id 1) for the waypoint formy_queue_wp. There is an incoming (id 11) and outgoing (id 12) link to the broker, and anotheroutlink (id 40) to the receiver.
- 3
- Amobilelink formy_address. Thedirisoutrelated to the receiver attached to it.
- 4
- Theoutlink from the router to the receiver formy_queue. This enables the router to deliver messages to the receiver.
- 5
- Theinlink to the router formy_queue. This enables the router to get messages frommy_queueso that they can be sent to the receiver on theoutlink.
- 6
- The remaining links are related to the$managementaddress and are used byqdstatto receive the information that is displayed by this command.
 
9.2.5. Viewing Known Routers on a Network
To see the topology of the router network, you can view known routers on the network.
Procedure
- Use this command: - qdstat -n [CONNECTION_OPTIONS] - $ qdstat -n [CONNECTION_OPTIONS]- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - For more information about the fields displayed by this command, see the qdstat -n output columns. - In this example, - Router.Ais connected to- Router.B, which is connected to- Router.C. Viewing the router topology on- Router.Ashows the following:- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- Router.Ahas one neighbor:- Router.B.
- 2
- Router.Bis connected to- Router.Aand- Router.Cover- link0. The- costfor- Router.Ato reach- Router.Bis 1, because the two routers are connected directly.
- 3
- Router.Cis connected to- Router.B, but not to- Router.A. The- costfor- Router.Ato reach- Router.Cis 2, because messages would have to pass through- Router.Bas the- next-hop.
 - Router.Bshows a different view of the router topology:- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - The - neighborslist is the same when viewed on- Router.B. However, from the perspective of- Router.B, the destinations on- Router.Aand- Router.Cboth have a- costof- 1. This is because- Router.Bis connected to- Router.Aand- Router.Cthrough links.- The - valid-originscolumn shows that starting from- Router.C,- Router.Bhas the best path to reach- Router.A. Likewise, starting from- Router.A,- Router.Bhas the best path to reach- Router.C.- Finally, - Router.Cshows the following details about the router topology:- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Due to a symmetric topology, - Router.C’s perspective of the topology is very similar to `Router.A’s. The primary difference is the `cost: the cost to reach- Router.Bis- 1, because the two routers are connected. However, the cost to reach- Router.Ais- 2, because the messages would have to pass through- Router.Bas the- next-hop.
9.2.6. Viewing Addresses Known to a Router
You can view message-routed and link-routed addresses known to a router.
Procedure
- Use the following command: - qdstat -a [CONNECTION_OPTIONS] - $ qdstat -a [CONNECTION_OPTIONS]- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - For more information about the fields displayed by this command, see the qdstat -a output columns. - In this example, - Router.Ais connected to both- Router.Band a broker. The broker has two queues: *- my_queue(with a link route on- Router.A) *- my_queue_wp(with a waypoint and autolinks configured on- Router.A)- In addition, there are three receivers: one connected to - my_addressfor message routing, another connected to- my_queue, and the last one connected to- my_queue_wp.- Viewing the addresses displays the following information: - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- An address related toRouter.Bwith aremoteat 1. This is the consumer fromRouter.B.
- 2
- Themy_addressaddress has one local consumer, which is related to the single receiver attached on that address. Theinandoutfields are both 1, which means that one message has traveled through this address using theclosestdistribution method.
- 3
- The incoming link route for themy_queueaddress. This address has one locally-attached container (cntnr) as a destination (in this case, the broker). The following entry is the outgoing link for the same address.
- 4
- The incoming autolink for themy_queue_wpaddress and configured waypoint. There is one local consumer (local) for the attached receiver. The following entry is the outgoing autolink for the same address. A single message has traveled through the autolinks.
- 5
- Theqdhello,qdrouter, andqdrouter.maaddresses are used to periodically update the network topology and deliver router control messages. These updates are made automatically through the inter-router protocol, and are based on all of the messages the routers have exchanged. In this case, the distribution method (distrib) for each address is either flood or multicast to ensure the control messages reach all of the routers in the network.
 
9.2.7. Viewing a Router’s Autolinks
You can view a list of the autolinks that are associated with waypoint addresses for a node on another container (such as a broker).
Procedure
- Use the following command: - qdstat --autolinks [CONNECTION_OPTIONS] - $ qdstat --autolinks [CONNECTION_OPTIONS]- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - For more information about the fields displayed by this command, see the qdstat --autolinks output columns. - In this example, a router is connected to a broker. The broker has a queue called - my_queue_wp, to which the router is configured with a waypoint and autolinks. Viewing the autolinks displays the following:- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- The incoming autolink frommy_queue_wp. As indicated by thestatusfield, the link is active, because the broker is running and the connection for the link is already established (as indicated by thelinkfield).
- 2
- The outgoing autlink tomy_queue_wp. Like the incoming link, it is active and has an established connection.
 
9.2.8. Viewing the Status of a Router’s Link Routes
You can view the status of each incoming and outgoing link route.
Procedure
- Use the following command: - qdstat --linkroutes [CONNECTION_OPTIONS] - $ qdstat --linkroutes [CONNECTION_OPTIONS]- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - For more information about the fields displayed by this command, see the qdstat --linkroutes output columns. - In this example, a router is connected to a broker. The router is configured with a link route to the - my_queuequeue on the broker. Viewing the link routes displays the following:- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
9.2.9. Viewing Memory Consumption Information
If you need to perform debugging or tracing for a router, you can view information about its memory consumption.
Procedure
- Use the following command: - qdstat -m [CONNECTION_OPTIONS] - $ qdstat -m [CONNECTION_OPTIONS]- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - This command displays information about allocated objects, their size, and their usage by application threads: - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
9.3. Managing AMQ Interconnect Using qdmanage
				You can use qdmanage to view and modify the configuration of a running router at runtime. Specifically, qdmanage enables you to create, read, update, and delete the sections and attributes in the router’s configuration file without having to restart the router.
			
					The qdmanage tool implements the AMQP management specification, which means that you can use it with any standard AMQP-managed endpoint, not just with AMQ Interconnect.
				
9.3.1. Syntax for Using qdmanage
					You can use qdmanage with the following syntax:
				
qdmanage [CONNECTION_OPTIONS] OPERATION [OPTIONS]
$ qdmanage [CONNECTION_OPTIONS] OPERATION [OPTIONS]This specifies:
- One or more optional - connection_optionsto specify the router on which to perform the operation, or to supply security credentials if the router only accepts secure connections.- If you do not specify any connection options, - qdmanageconnects to the router listening on localhost and the default AMQP port (5672).
- 
							The operationto perform on the router.
- 
							One or more optional optionsto specify a configuration entity on which to perform the operation or how to format the command output.
					When you enter a qdmanage command, it is executed as an AMQP management operation request, and then the response is returned as command output in JSON format.
				
For example, the following command executes a query operation on a router, and then returns the response in JSON format:
					For more information about qdmanage, see the qdmanage man page.
				
9.3.2. Managing Network Connections
					You can use qdmanage to view, create, update, and delete listeners and connectors for any router in your router network.
				
9.3.2.1. Managing Listeners
						Listeners define how clients can connect to a router. The following table lists the qdmanage commands you can use to perform common operations on listeners.
					
For more information about the attributes you can use with these commands, see the listener section in the Configuration Reference.
The commands in this table demonstrate operations on the local router listening on localhost and the default AMQP port (5672). If you want to perform an operation on a different router in the router network, you must specify the necessary connection options. For more information, see Connection Options in the qdmanage man page.
| To… | Use this command… | 
|---|---|
| View the router’s listeners | qdmanage query --type=listener  | 
| View the roles and ports on which the router is listening | qdmanage query role port --type=listener  | 
| View the attributes configured for a listener | qdmanage read --name=LISTENER_NAME  | 
| Create a listener | qdmanage create --type=listener --ATTRIBUTE=VALUE ...  | 
| Create multiple listeners | 
 These commands use a JSON map to create two listeners. | 
| Update a listener | qdmanage update --type=listener --ATTRIBUTE=VALUE ...  | 
| Update multiple listeners | 
 These commands use a JSON map to update two listeners. | 
| Delete an attribute from a listener | qdmanage update --type=listener --ATTRIBUTE  | 
| Delete a listener | qdmanage delete --name=LISTENER_NAME  | 
9.3.2.2. Managing Connectors
						Connectors define how the router can connect to other endpoints in your messaging network, such as brokers and other routers. The following table lists the qdmanage commands you can use to perform common operations on connectors.
					
For more information about the attributes you can use with these commands, see the connector section in the Configuration Reference.
The commands in this table demonstrate operations on the local router listening on localhost and the default AMQP port (5672). If you want to perform an operation on a different router in the router network, you must specify the necessary connection options. For more information, see Connection Options in the qdmanage man page.
| To… | Use this command… | 
|---|---|
| View the router’s connectors | qdmanage query --type=connector  | 
| View the roles and ports on which the router can connect to other endpoints | qdmanage query role port --type=connector  | 
| View the attributes configured for a connector | qdmanage read --name=CONNECTOR_NAME  | 
| Create a connector | qdmanage create --type=connector --ATTRIBUTE=VALUE ...  | 
| Create multiple connectors | 
 These commands use a JSON map to create two connectors. | 
| Update a connector | qdmanage update --type=connector --ATTRIBUTE=VALUE ...  | 
| Update multiple connectors | 
 These commands use a JSON map to update two connectors. | 
| Delete an attribute from a connector | qdmanage update --type=connector --ATTRIBUTE  | 
| Delete a connector | qdmanage delete --name=CONNECTOR_NAME  | 
9.3.3. Managing Security
					AMQ Interconnect supports both SSL/TLS and SASL security protocols for encrypting and authenticating incoming and outgoing connections for your routers. You can use qdmanage to view, create, update, and delete security policies for any router in your router network.
				
9.3.3.1. Managing SSL/TLS Encryption and Authentication
						AMQ Interconnect supports SSL/TLS for certificate-level encryption and mutual authentication. The following table lists the common qdmanage commands you can use to secure incoming and outgoing connections for a router in your router network.
					
For more information about the attributes you can use with these commands, see the sslProfile and listener sections in the Configuration Reference.
The commands in this table demonstrate operations on the local router listening on localhost and the default AMQP port (5672). If you want to perform an operation on a different router in the router network, you must specify the necessary connection options. For more information, see Connection Options in the qdmanage man page.
| To… | Use this command… | 
|---|---|
| View the router’s SSL configuration | qdmanage query --type=sslProfile  | 
| Set up SSL for the router | qdmanage create --type=sslProfile --name=NAME --certDB=PATH --certFile=PATH --keyFile=PATH --ATTRIBUTE=VALUE ...  | 
| Add SSL/TLS encryption to an incoming connection | qdmanage update --name=LISTENER_NAME --sslProfile=NAME --requireSsl=yes  | 
| Change SSL/TLS encryption on an incoming connection | qdmanage update --name=LISTENER_NAME --ATTRIBUTE=VALUE ...  | 
| Add SSL/TLS client authentication to an incoming connection | qdmanage update --name=LISTENER_NAME --authenticatePeer=yes  | 
| Remove SSL/TLS client authentication from an incoming connection | qdmanage update --name=LISTENER_NAME --authenticatePeer=no  | 
| Add SSL/TLS client authentication to an outgoing connection | qdmanage update --name=CONNECTOR_NAME --sslProfile=NAME  | 
| Remove SSL/TLS client authentication from an outgoing connection | qdmanage update --name=CONNECTOR_NAME --sslProfile  | 
| Delete an SSL profile | qdmanage delete --name=SSL_PROFILE_NAME  | 
9.3.3.2. Managing SASL Encryption and Authentication
						AMQ Interconnect supports SASL for authentication and payload encryption. The following table lists the common qdmanage commands you can use to secure incoming and outgoing connections for a router in your router network.
					
For more information about the attributes you can use with these commands, see the router and listener sections in the Configuration Reference.
The commands in this table demonstrate operations on the local router listening on localhost and the default AMQP port (5672). If you want to perform an operation on a different router in the router network, you must specify the necessary connection options. For more information, see Connection Options in the qdmanage man page.
| To… | Use this command… | 
|---|---|
| Set up SASL for the router | qdmanage update --type=router --saslConfigPath=PATH --saslConfigName=NAME  | 
| Add SASL authentication to an incoming connection | qdmanage update --name=LISTENER_NAME --authenticatePeer=yes --saslMechanisms=MECHANISMS  | 
| Change SASL mechanisms for an incoming connection | qdmanage update --name=LISTENER_NAME --saslMechanisms=MECHANISMS  | 
| Add SASL authentication to an outgoing connection | qdmanage update --name=CONNECTOR_NAME --saslMechanisms=MECHANISMS --saslUsername=USERNAME --saslPassword=PASSWORD  | 
| Change SASL mechanisms for an outgoing connection | qdmanage update --name=CONNECTOR_NAME --saslMechanisms=MECHANISMS  | 
| Add SASL payload encryption to an incoming connection | qdmanage update --name=LISTENER_NAME --requireEncryption=yes --saslMechanisms=MECHANISMS  | 
| Change SASL mechanisms for an incoming connection | qdmanage update --name=LISTENER_NAME --saslMechanisms=MECHANISMS  | 
| Remove SASL payload encryption from an incoming connection | qdmanage update --name=LISTENER_NAME --requireEncryption=no --saslMechanisms  | 
| Delete a SASL configuration | qdmanage update --type=router --saslConfigPath --saslConfigName  | 
9.3.4. Managing Routing
					AMQ Interconnect supports both message routing and link routing for distributing messages between senders and receivers. You can use qdmanage to view how addresses and link routes are configured in your environment, and define how a router should distribute messages.
				
9.3.4.1. Managing Message Routing
						Message routing involves configuring addresses to define how AMQ Interconnect should distribute messages. The following table lists the common qdmanage commands you can use to configure addresses for a router in your router network.
					
For more information about the attributes you can use with these commands, see the address and autoLink sections in the Configuration Reference.
The commands in this table demonstrate operations on the local router listening on localhost and the default AMQP port (5672). If you want to perform an operation on a different router in the router network, you must specify the necessary connection options. For more information, see Connection Options in the qdmanage man page.
| To… | Use this command… | 
|---|---|
| View addresses | qdmanage query --type=address qdmanage read --name=ADDRESS_NAME  | 
| View address distribution patterns | qdmanage query prefix distribution --type=address  | 
| View waypoints to broker queues | qdmanage query prefix --type=address --waypoint=yes  | 
| View autolinks | qdmanage query --type=autolink  | 
| Set a distribution pattern for an address | qdmanage create --type=address --prefix=ADDRESS_PREFIX --distribution=DISTRIBUTION_PATTERN ...  | 
| Set distribution patterns for multiple addresses | 
 These commands configure two addresses. | 
| Connect an address to a broker queue | 
 | 
| Update an address configuration | qdmanage update --name=ADDRESS_NAME --ATTRIBUTE=VALUE ...  | 
| Update an autolink | qdmanage update --name=AUTOLINK_NAME --ATTRIBUTE=VALUE ...  | 
| Delete an address configuration | qdmanage delete --name=ADDRESS_NAME  | 
| Delete an autolink | qdmanage delete --name=AUTOLINK_NAME  | 
9.3.4.2. Managing Link Routing
						A link route is a chain of links between a sender and receiver that provides a private messaging path. The following table lists the common qdmanage commands you can use to view, create, update, and delete link routes.
					
For more information about the attributes you can use with these commands, see the linkRoute section in the Configuration Reference.
The commands in this table demonstrate operations on the local router listening on localhost and the default AMQP port (5672). If you want to perform an operation on a different router in the router network, you must specify the necessary connection options. For more information, see Connection Options in the qdmanage man page.
| To… | Use this command… | 
|---|---|
| View link routes | qdmanage query --type=linkRoute qdmanage read --name=LINK_ROUTE_NAME  | 
| Create a link route | 
 | 
| Update a link route | qdmanage update --name=LINK_ROUTE_NAME --ATTRIBUTE=VALUE ...  | 
| Delete a link route | qdmanage delete --name=INCOMING_LINK_ROUTE_NAME qdmanage delete --name=OUTGOING_LINK_ROUTE_NAME  | 
9.3.5. Managing Logging
					AMQ Interconnect logs are broken into different categories called logging modules. Each module provides important information about a particular aspect of a router. The following table lists the common qdmanage commands you can use to view and change the configuration of a logging module.
				
For more information about the attributes you can use with these commands, see the log section in the Configuration Reference.
The commands in this table demonstrate operations on the local router listening on localhost and the default AMQP port (5672). If you want to perform an operation on a different router in the router network, you must specify the necessary connection options. For more information, see Connection Options in the qdmanage man page.
| To… | Use this command… | 
|---|---|
| View the logging configuration | qdmanage query --type=log  | 
| View the logging configuration for a logging module | qdmanage read --type=log --module=LOGGING_MODULE_NAME  | 
| Set the default logging configuration | qdmanage create --type=log --module=DEFAULT --enable=LOGGING_LEVEL --timestamp=yes --ATTRIBUTE=VALUE  | 
| Enable logging for a logging module | qdmanage create --type=log --module=LOGGING_MODULE_NAME --enable=LOGGING_LEVEL --ATTRIBUTE=VALUE ...  | 
| Change the logging configuration for a logging module | qdmanage update --type=log --module=LOGGING_MODULE_NAME --ATTRIBUTE=VALUE ...  |