Calling Sequence for Sharing Client State
You can follow the steps below to allow multiple Broker clients to share the same client state.
1. Create a new BrokerConnectionDescriptor and set the state sharing to true.
2. Create a new BrokerClient, passing a client ID and the descriptor created in step 1.
3. After the Broker client is created with shared state, other Broker clients using the same Broker can use the BrokerClient.reconnect method, along with the client ID from step 2, to connect to the Broker client. No special BrokerConnectionDescriptor settings are required when reconnecting.
Note:
All Broker clients that are to share the same state must be connected to the same Broker.