Broker 10.5 | webMethods Broker Documentation | webMethods Broker Client C API Programmer's Guide | API Reference | awReconnect | awReconnectBrokerTxClient
BrokerError awReconnectBrokerTxClient(
char *broker_host,
char *broker_name,
char *client_id,
BrokerConnectionDescriptor desc,
BrokerTxClient *txclient);
The name of the host which is running the Broker that the Transactional Broker client will use. Specified in the form <broker_host_name>:<port_number>. If you omit the port number, the default port number will be used. For example: MyHost:12000
The name of the Broker to which the Transactional Broker client will be connected. If NULL, the default Broker will be used. If specified, the length of this parameter must be 1 to 255 ANSI characters or 1 to 42 Unicode characters.
A string containing a unique identifier for creating or reconnecting the Transactional Broker client. See Client Identifiers for more information. The client id can be NULL to request the Broker to create an identifier (usually used with destroy-on-disconnect clients).
The connection descriptor to use for the Transactional Broker client. If NULL, a default connection will be established for the new client, which may be shared with other Broker clients.
A pointer to the reconnected or newly created Transactional Broker client. This parameter is used for output.
Reconnects a transactional client. broker_name can be NULL to request the default Broker. desc can be NULL to request a default connection. The state sharing flag in the descriptor is ignored by this call. Whether or not the client shares state can only be set when making a new transactional client. For normal clients, only one active connection can be made to the Broker for a given client_id, so an error can be returned on reconnect if the client_id is already in use. For clients with shared state, multiple reconnects to the client_id can be made, but an error can be returned if the share limit is exceeded.
The caller is responsible for calling awDestroyClient on the output value.
Possible BrokerError major codes
The host exists but no Broker is running on that host.
Another Broker client is using the specified client_id. For clients with shared state, this error is returned if the maximum number of reconnected clients has been exceeded.
A problem occurred during connection establishment.
The broker_host could not be found.
The desc parameter is invalid.
Permission to join the specified client_group was denied.
The broker_host, client_group, app_name, or client parameter is NULL.
A secure connection was attempted, but was rejected by the Broker.
The specified broker_name does not exist. If broker_name is NULL, this indicates that there is no default Broker.
The specified client_id does not exist on the Broker.