Broker 10.5 | webMethods Broker Documentation | webMethods Broker Client C API Programmer's Guide | API Reference | awNew | awNewOrReconnectBrokerClient
 
awNewOrReconnectBrokerClient
BrokerError awNewOrReconnoctBrokerClient(
char *broker_host,
char *broker_name,
char *client_id,
char *client_group,
char *app_name,
BrokerConnectionDescriptor desc,
BrokerClient *client);
broker_host
The name of the host where the Broker is executing that the 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
broker_name
The name of the Broker to which the 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.
client_id
A string containing a unique identifier for creating or reconnecting the Broker client. See Client Identifiers for more information.
client_group
The name of the client group for the Broker client. Client groups are discussed in Administering webMethods Broker .
app_name
The name of the application that will contain the Broker client.
desc
The connection descriptor to use for the Broker client. If NULL, a default connection will be established for the new client, which may be shared with other Broker clients.
client
A pointer to the reconnected or newly created Broker client. This parameter is used for output.
Attempts to create a new Broker client with an event queue and zero subscriptions. If a Broker client with the same client_id already exists, this client will be reconnected. After invoking this function, the Broker client may begin processing events.
The client state sharing property of desc will be ignored if the Broker client already exists and is being reconnected.
The application is responsible for invoking either the awDisconnectClient or awDestroyClient function when the Broker client is no longer needed.
Possible BrokerError major codes
Meaning
AW_ERROR_BROKER_NOT_RUNNING
The host exists but no Broker is running on that host.
AW_ERROR_CLIENT_CONTENTION
The specified client_id is already in use by another Broker client. If state sharing is enabled, this indicates the maximum number of Broker 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_CLIENT_ID
The client_id contains invalid characters.
AW_ERROR_INVALID_DESCRIPTOR
The desc parameter is invalid.
AW_ERROR_INVALID_NAME
The app_name parameter is invalid.
AW_ERROR_NO_PERMISSION
Permission to join the specified client_group was denied.
AW_ERROR_NULL_PARAM
The broker_host, client_id, client_group, app_name, or client parameter 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_GROUP
if the specified client group does not exist on the 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: