Subscription target and run mode

The target for a subscription is the object on which the subscription acts. A subscription runs either synchronously or asynchronously.

Subscription target

The subscription target determines the events that can be selected for a subscription. The subscription target is specified in one of the following ways:

  • Class: The subscription applies to all objects that belong to the class.
  • Version: The subscription applies to all versions of a versionable object.
  • Object: The subscription applies to a specific version of an object.
Tip: Make the subscription target a class for the following benefits:
  • Consistent management for a set of common objects
  • Minimal system performance impact because the number of subscriptions that run simultaneously is limited

Subscription run mode

In synchronous execution, the call to run the event action blocks further processing by the subscription processor until the action completes. The action runs in the same transaction as the originating activity on the subscription target. If the action fails, the transaction rolls back.

In asynchronous execution, the action occurs on a separate execution thread, which allows the subscription processor to continue without waiting for the results of the action. The action cannot be in the same transaction as the originating activity. When an asynchronous event is queued in an object store, that queued event can be processed by any server within the same site as that object store, not just the server that generated the event.