Broker 10.15 | webMethods Broker Documentation | webMethods Broker Client C API Programmer's Guide | API Reference | awReconnect | awReconnectBrokerClient
 
awReconnectBrokerClient
BrokerError awReconnectBrokerClient(
char *broker_host,
char *broker_name,
char *client_id,
BrokerConnectionDescriptor desc,
BrokerClient *client);
broker_host
The name of the host running the Broker that the Broker client will use. Specified in the form <broker_host_name>:<port_number>. If the port number is omitted, the default port number will be used. For example:
MyHost:12000
broker_name
The name of the Broker. If set to NULL, the default Broker name is used. If specified, the length of this parameter must be 1 to 255 ANSI characters or 1 to 42 Unicode characters.
client_id
The client identifier, identifying the Broker client as the one that was previously disconnected. See Client Identifiers for more information.
desc
The connection descriptor to use for the Broker client. If set to NULL, a default connection will be established which may be shared with other clients.
client
A pointer to the Broker client. This parameter is used for output.
Reconnects a 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 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
Meaning
AW_ERROR_BROKER_NOT_RUNNING
A Broker with broker_name could not be found on the specified broker_host.
AW_ERROR_CLIENT_CONTENTION
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.
AW_ERROR_COMM_FAILURE
A problem occurred during connection establishment.
AW_ERROR_HOST_NOT_FOUND
The broker_host could not be found.
AW_ERROR_INVALID_DESCRIPTOR
The desc parameter is invalid.
AW_ERROR_NO_PERMISSION
Permission to join the specified client_group was denied.
AW_ERROR_NULL_PARAMETER
The broker_host or client_id is NULL.
AW_ERROR_SECURITY
A secure connection was attempted, but was rejected by the Broker.
AW_ERROR_UNKNOWN_BROKER_NAME
The specified broker_name does not exist. If broker_name is NULL, this indicates that there is no default Broker.
AW_ERROR_UNKNOWN_CLIENT_ID
The specified client_id does not exist on the Broker.
AW_ERROR_BASIC_AUTH_FAILURE
Basic authentication failed for the user.
AW_ERROR_INVALID_BASICAUTH_VALUE
You did not specify a password for the basic authentication user.
See also: