Identity options

Use this property to specify identity registration options for this subscriber.

Each application that requires subscriptions is represented by an identity. The broker maintains a set of subscriber identities for each subscription.

If no identity values are specified, the registration continues, regardless of any potential set of identities that are present.

You can select one or more values from this list. There is no default value.

The following values are available:

Add name
This subscriber name is added to the subscription if it is missing. If a subscription already exists for this name or if a matching subscription with a different name exists, the registration fails.
No alteration
Existing matching subscription attributes are not modified when the subscription is created. However, for subsequent subscriptions that match the identity of existing subscriptions, modifiable attributes of the original subscription are overwritten.

If either Join shared or Join exclusive is specified as the Identity options value, along with the Subscription identity value, the Identity options value is ignored. The Join shared value or the Join exclusive value specifies that the broker adds the Subscription identity value to the current set of identities for the subscription, regardless of whether No alteration is selected.

Join shared
The identity is added to the identity set for the subscription. The following statements must all be true:
  • None of the current members of the identity set for this subscription match the new one.
  • The subscription is not exclusively locked.

If the identity already has a shared entry for the subscription, the command succeeds. But it returns an already joined warning. If the subscription is exclusively locked, a subscription locked message is returned unless the entry with the locked subscription has a shared, preexisting identity. If both entries have the same identity, the lock is automatically modified to become a shared lock.

If the subscription contains a user ID that is different from the one in the identity, the registration fails unless Variable user ID is set on the original subscription. If this value is set, the user ID of the command message is checked to determine whether this ID has the authority to browse the stream queue and to put to the queue of the subscriber. If this ID does not have sufficient authority, the registration fails again.

Join exclusive
This identity is added as the exclusive member of the identity set for the subscription. No other identities can be added to this set.

If the subscription is exclusively locked, the registration fails if the identity with the exclusive lock is not this one. If it is the same identity, the subscription succeeds with an already joined warning.

If this identity has joined with the value of Join shared and this identity is the only entry in this identity set, the set is changed to an exclusive lock that is held by this identity. Otherwise, if the subscription currently has other identities in the identity set with shared access, the registration fails.

If an application attempts to register by using an identity with a user ID that is different from the currently registered user ID, the registration fails unless Variable user ID is set on the original subscription. Additionally, if it is set, there is sufficient authority to browse the stream queue and to put to the queue of the subscriber.

Variable user ID
The subscriber identity is not restricted to a single user ID. Any user can modify or deregister a subscription if this user has sufficient authority.

To add this value to an existing subscription, the command must come from the same user ID as the original subscription.

If this value refers to an existing subscription with this value selected, the subscription succeeds only if the user ID of the new subscription has the authority to both browse the stream queue and to put to the subscriber queue of the modified subscription. After successful completion, future publications to this subscriber are put to the queue of the subscriber by using the new user ID.

If this subscription does not have this value enabled and the original subscription does have it enabled, this value is removed from this subscription; and the user ID of this subscription is now fixed. If, after this has been implemented, a subscriber already exists who has the same identity, but with a different user ID that is associated to the subscription, the registration fails.