Broker 10.15 | webMethods Broker Documentation | webMethods Broker Client C API Programmer's Guide | Using Broker Clients | Broker Connection Descriptors | State Sharing Functions | Calling Sequence for Sharing Client State
 
Calling Sequence for Sharing Client State
You may follow the steps below to allow multiple Broker clients to share the same client state.
1. Call awNewBrokerConnectionDescriptor to create a descriptor and set the state sharing to 1 (true).
2. Call awNewBrokerClient to create your first client, passing a client ID and the descriptor created in step 1.
3. Once the Broker client is created with shared state, other Broker clients using the same Broker can use awReconnectBrokerClient and the client ID from step 2, to connect the Broker client. No special BrokerConnectionDescriptor settings are required when reconnecting.
Note:
All Broker clients wishing to share the same state must be connected to the same Broker.
4. When finished with the Broker client, the application is responsible for calling awDisconnectClient or awDestroyClient.