Home

 

clrmqbrk (Clear broker's memory of a neighboring target broker)

Purpose

Use the clrmqbrk command to clear the broker's memory of a neighboring (parent or child) target broker. On iSeries, the command name is CLRMQMBRK. Use this command in exceptional circumstances only.

The broker cancels all subscriptions from the target broker. The broker must be stopped when this command is issued. The command is synchronous, and when it has completed the broker can be restarted normally. No messages are read from any of the input queues.

After restart, the broker detects any messages on its input queues that came from this broker, and processes them according to their report options.

You need to clear the memory of the broker at each end of the connection. This means that issue this command (or an equivalent) to both the parent and the child broker. If you do not clear the memory of the broker at each end of the connection, one broker continues to send messages to the other broker, which are processed according to their report options. This might lead to a build-up of messages on the dead-letter queue, and unnecessary report messages being sent across the network.

Delete a broker with dltmqbrk requires first deleting its children. If this is impractical (for example, if the child broker is no longer reachable) the clrmqbrk command can be used to make the child broker appear deleted to its parent so that the parent can be deleted. The child broker must be deleted whenever practical.

We can also use this command at the child with the -p parameter to break the link with its parent. Using such a pair of clrmqbrk commands, one at the child and one at the parent, causes the child and its descendants (if any), together with their publishers and subscribers, to be isolated from the rest of the network. The child now becomes the root node of a hierarchy. It can operate this way or be restarted with another parent (or even with its old parent) provided the new parent is not also a descendant.

Note:
This command might mean that publications are not sent to subscribers that should receive them, even if the publishers or subscribers have registered with other brokers in the network. When making topology changes such as this to the broker hierarchy, it is the administrator's responsibility to ensure that publishers are quiesced, and not restarted until the effects of the topology change on the subscription state have propagated through the broker network.

Syntax

AIX, HP-UX, Linux, Solaris, and Windows


>>-clrmqbrk--+- -p --------------+-- -m QMgrName--------------->< '- -c ChildQMgrName-'

Required parameters

AIX, HP-UX, Linux, Solaris, and Windows

-p

Specifies that the link is to be broken with the parent broker. If you specify this parameter, do not specify the -c parameter

-c ChildQMgrName

Specifies that the link is to be broken with a child broker; you also need to specify the name of the queue manager that hosts the child broker. If you specify this parameter, do not specify the -p parameter

-m QMgrName

The name of the queue manager hosting the broker whose link is to be broken.

Syntax

iSeries


>>-CLRMQMBRK--+- BRKPARENT--+-(*YES)-+---+----------------------> | '-(*NO)--' | '- CHILDMQM(ChildQMgrName)-' >-- MQMNAME(QMgrName)------------------------------------------><

Required parameters

iSeries

BRKPARENT

Specifies whether the link is to be broken with the parent broker. If you specify this parameter, do not specify the CHILDMQM parameter

(*YES)

Breaks the link with the parent broker.

(*NO)

Keeps the link with the parent broker.

CHILDMQM(ChildQMgrName)

Specifies that the link is to be broken with a child broker; you also need to specify the name of the queue manager that hosts the child broker. If you specify this parameter, do not specify the BRKPARENT parameter

MQMNAME(QMgrName)

The name of the queue manager hosting the broker whose link is to be broken.

Return codes

0

Command completed normally

10

Command completed with unexpected results

20

An error occurred during processing

Examples

In a broker network like this:

   grandparentQM
         |
     parentQM
         |
      childQM

remove the parentQM from the network like this:

  1. clrmqbrk -m grandparentQM -c parentQM

    breaks the link between the broker on grandparentQM and its child on parentQM.

  2. clrmqbrk -m parentQM -p

    breaks the link between the broker on parentQM and its parent.

  3. clrmqbrk -m parentQM -c childQM

    breaks the link between the broker on parentQM and its child on childQM.

  4. clrmqbrk -m childQM -p

    breaks the link between the broker on childQM and its parent.

If the broker on childQM is started bystrmqbrk -m childQM -p grandparentQM at restart, the broker network now looks like this:

   grandparentQM
         |
      childQM
Attention

If you do not issue the clrmqbrk command at both ends of a connection, for example, by omitting step 3 above, and you try to reconnect the brokers on parentQM and childQM at restart, reconnection fails with an AMQ5839 message at the parent, an AMQ5822 message at the child, and an AMQ5839 FDC file is generated. If you issue the clrmqbrk command at both ends of the connection now, it will not fix the problem. You must issue the following commands, assuming that the parent and child brokers are running with channels between them:

  1. endmqbrk -m childQM

    Wait a few seconds for the failed registration message to reach the child.

  2. clrmqbrk -m childQM -p

  3. strmqbrk -m childQM

    Note that there is no parent argument. Wait a few seconds for the failed registration message to be removed.

  4. endmqbrk -m parentQM

  5. endmqbrk -m childQM

  6. clrmqbrk -m parentQM -c childQM

  7. strmqbrk -m parentQM

  8. strmqbrk -m childQM -p parentQM

These commands restore the connection between the brokers on parentQM and childQM and leave the network looking like this:

     parentQM
         |
      childQM


 

Home