Using Multiple BrokerAdminClients
You may find that a number of programming situations are made easier by creating multiple BrokerAdminClient objects within a single application.
If your application needs to monitor several
Brokers at once, you can use a separate client for each
Broker.
Because different
Broker clients can belong to distinct client groups, they can subscribe to and publish different event types and their administrative permissions may be different.
A multi-threaded application can spawn separate threads for each
Broker client, which can result in a cleaner programming model.
The webMethods Broker API allows you to disconnect a Broker client from a Broker without actually destroying the Broker client. This is only useful if your Broker client's life cycle is explicit-destroy because the client state for the Broker client and all queued events will have been preserved by the Broker. Any events received by the Broker for your Broker client while it was disconnected will remain in the Broker client's event queue. When your Broker client reconnects to the Broker, specifying the same client ID, it can continue retrieving events from the event queue. Disconnecting and reconnecting can be particularly useful for applications that wish to do batch-style processing at scheduled intervals.