Event Routing 10.7 | Communicating between Software AG Products Using Event Routing | Understanding Event Routing | Event Types | Heartbeats
 
Heartbeats
A heartbeat is a special kind of event without a payload. It indicates that the event channel on which it is being sent is active but that no payload events are currently being sent on the same channel.
The header of a heartbeat event specifies event type corresponding to the channel the heartbeat is being sent on, the start date and time of the heartbeat, and the Kind header field is set to Heartbeat.
An example of the use of heartbeats is for CEP applications, in which heartbeats can be used within a non-event detection query to determine whether the timespan in which a certain pattern did not occur has expired.
Some applications may not support heartbeats. Event receivers can suppress receiving heartbeat events by using message selection filtering on the value of the Kind attribute. The following message selector can be used for this purpose:
$Event$Kind <>’Heartbeat’ or $Event$Kind is null
Here is a sample heartbeat event:
<evt:Event xmlns:evt="http://namespaces.softwareag.com/EDA/Event">
  <evt:Header>
    <evt:Type>{http://namespaces.softwareag.com/EDA/WebM/Sample/
       InventoryMgmt/1.0}PartInventoryLow</evt:Type>
    <evt:Start>2019-05-20T16:53:46.918-06:00</evt:Start>
    <evt:Kind>Heartbeat</evt:Kind>
      <evt:EventId>0f375801-dbd4-4a46-9f70-7015deca6c80</evt:EventId>
  </evt:Header>
</evt:Event>