Edit Apama Event Sources

You can edit an already existing Apama Event Source.

Procedure

  1. Open the MashZone NextGen Admin Console.
  2. Click Event Service to expand this section of the Administration menu.
  3. Click Event Service.
  4. Open the Apama tab.
  5. Click the Edit icon to configure an Apama Event Source.
  6. Set the properties for this event source. See the table Apama Event Source properties below.
  7. Click Save.

The Apama Event Source is created and listed by alias name.

Apama Event Source properties

Property

Required

Description

Alias

yes

Enter a unique name for this event source.

Start the event source automatically on server startup.

 

This option is set by default, which automatically starts this event source when MashZone NextGen Server starts. Clear this option if you want to manually control startup for this event source.

Apama instance

yes

Alias with the pre-configured connection specification of a running Apama system (local or remote). See Manage Apama Instances for details.

Apama Scenario

yes

Click Refresh to update the list of Apama scenarios for the selected Apama Event Source. If the Apama URL is set to a valid Apama system, then you can select a scenario to which this event source should subscribe.

Strategy

yes

The strategy that this event source uses for saving and removing events published by the Event Bus. Valid strategies are:

  • BUFFER = FIFO (first in-first out). Events are stored until the event source memory reaches capacity and then the event source removes the oldest events.
  • DELTA= Events are stored by ID and added, updated, or removed based on a command within the event. An event with an Insert command is saved in the event source memory, any existing event with the same ID is overwritten. An event with a Remove command removes an existing event with the same ID.
  • PARTIAL_EVENTS = Each event has a unique identifier defined by one or more key fields (see Key attributes). Events contain additional fields, but cannot contain all possible fields for the event. Simply put, each event can contain partial data.

    The event source maintains a single row for each unique event key representing the current full status for that event. Events published by Apama scenarios update the fields in that event source row that are included in the event, leaving other existing data for that event source row intact.

    Events that have a new unique key are saved as a new row until the event source memory is full. When the event source memory is full, new events are discarded.

  • SCENARIO = Events are stored according to the respective Apama Scenario Definition.

    MashZone NextGen automatically determines the unique identifier of each event, defined by one or more key fields. MashZone NextGen maintains a single row for each event key, updating its values by processing the Apama scenario InstanceUpdated Events.

    This strategy also supports the Apama scenario InstanceRemoved Events. When an InstanceRemoved event is received, the corresponding row is removed from the Apama Event Source.

    Apama Event Sources using the SCENARIO strategy do not store events in the Event Service HA-Store. When a SCENARIO event source is restarted, it always receives the current scenario state from its Apama instance connection.

Consider dimension

 

Available only when Strategy is set to BUFFER.

Set this option to save events in separate series (or buckets) for each unique value of the Dimension attribute.

Dimension attribute

conditional

Available only when Strategy is set to BUFFER and required when the Consider dimension option is set.

Select the event attribute whose unique values determine separate event series (buckets) for this event source.

Max. number of dimension values

conditional

Available only when Strategy is set to BUFFER and required when the Consider dimension option is set.

Enter the maximum number of unique dimension values (buckets) that can be tracked. Thus this is the maximum number of series that can store events.

Default value: 10 (Max: 100.000).

The result of multiplying Max. number of dimension values by Capacity per dimension value must not exceed 100.000.

Dimension Squeeze-out

 

Available only when Strategy is set to BUFFER and required when the Consider dimension option is set.

Determines how additional events are handled when they have new unique values for the dimension that defines buckets in this event source, but the maximum number of unique values (buckets) has already been reached.

This option is not set by default. the option discards new events with new unique dimension values when the maximum number of buckets has been reached.

Set this option to change the bucket strategy to FIFO (first-in, first-out), which discards events for older series (buckets) and stores the newer event in a new series (bucket).

Default value: false

Capacity per dimension value

conditional

Available only when Strategy is set to BUFFER and required when the Consider dimension option is set.

Enter the maximum number of events that can be stored in a specific event series (bucket) for each unique dimension value.

Default value: 10;

The result of multiplying Max number of dimension values by Capacity per dimension value must not exceed 100 000.

Event ID attribute

yes

Available only, when Strategy is set to DELTA.

Select the attribute that identifies an event. The event ID and command determines which events are stored, updated or removed in this event source.

Command attribute

yes

Available only, when Strategy if set to DELTA.

Select the attribute that contains the event command (Insert or Remove). The event ID and command determine which events are stored, updated, or removed in this event source.

Key attributes

yes

Available only, when Strategy is set to PARTIAL_EVENT.

The field(s) in events with partial data that uniquely identify an event. The event ID is used to ensure that events with partial data properly insert or update events in this event source.

Select one or more attributes that uniquely identify events for this Apama scenario. If multiple fields are required, the order in which you select attributes determines how fields are combined to determine event IDs.

Capacity

yes

Enter the maximum number of events to store in this event source. (Max: 100.000)

Default value: 10

Memory model

 

Determines where events are stored:

  • Internal: default. Stores events in local memory for this event source.
  • BigMemory Max: stores events in a local BigMemory Max cache.

Throttling

 

Controls the speed and volume of event data that is pushed to views that subscribe to this event source. By default, event sources push event data every 500 milliseconds. You can do the following:

  • Change the number of milliseconds to control throttling.
  • Change the measurement (Default=500) to Events to have throttling wait until a specific number of events is received and change the number, if needed.

See Example below.

Exception

 

Set this option to support a hybrid throttling strategy, typically involving both time and event limitations. Then set the exception criteria (Default=1):

  • A number
  • Milliseconds or Events as the measurement for the exception criteria

See Example below.

Simple and Hybrid Throttling Strategies

Simple throttling strategies cause an event source to wait for either a specific time interval or for the receipt of a specific number of events, and then push all new events to any subscribed real-time views. Throttling can slow event updates to real-time views when the volume or frequency of events causes rendering issues.

The default behavior is to push events to views based on a time interval of every 500 milliseconds. You can change the time interval or change the criteria to push events as soon as a minimum count of events are received, such as 10 events. For example:

Simple strategies might not be able to balance the event flow adequately. Instead, you can create hybrid strategies, such as "generally push every 50 milliseconds, but at most 10 events."

Hybrid strategies define the general throttling with the Throttling fields. You set the Exception option and define the exception that should break the general rule in the Exception criteria fields:

With the example hybrid throttling strategy shown above:

On the Apama Event Source overview page you can click on the Alias to show a preview of the specific Event Source properties.