Broker 10.5 | webMethods Broker Documentation | webMethods Broker Client C API Programmer's Guide | API Reference | awNew | awNewSubscriptionWithId
 
awNewSubscriptionWithId
BrokerError awNewSubscriptionWithId(
BrokerClient client,
int sub_id,
char *event_type_name,
char *filter);
client
The Broker client requesting the subscription.
sub_id
The subscription ID.
event_type_name
The event type name for the subscription.
filter
The event filter string. Set to NULL if event filtering is not desired.
Subscribes the specified client to events of the specified event type that match the filter string. If filter is NULL, all events of the given event type are considered to match the subscription. The sub_id will be associated with any event received by client that matches the event_type_name and filter. An asterisk can be added to the end of an event type name as a wildcard if you want to open a subscription for multiple event types.
Note:
When using wildcards in the event_type_name, the filter may contain envelope fields but it may not contain any data fields. Wildcards cannot be used with the Broker::Trace or Broker::Activity event types.
If the subscription has already been registered, calling this function will have no effect. A subscription with a sub_id of 1 will not be replaced with a new subscription with a sub_id of 2 that otherwise is identical. Subscription IDs do not uniquely identify a particular subscription, so you can create different subscriptions and specify the same subscription ID. See Uniqueness of Subscriptions for more information on what differentiates one subscription from another.
Possible BrokerError major codes
Meaning
AW_ERROR_INVALID_CLIENT
The client has been destroyed or disconnected.
AW_ERROR_INVALID_SUBSCRIPTION
The filter string contains a parse error.
AW_ERROR_NO_PERMISSION
The client does not have permission to subscribe to the event type.
AW_ERROR_NULL_PARAM
The event_type_name is NULL.
AW_ERROR_OUT_OF_RANGE
The sub_id parameter is less than zero.
AW_ERROR_UNKNOWN_EVENT_TYPE
The event type does not exist on the Broker.
See also: