Choose an Adequate warm-up-window Time Ensure Applications are Idempotent

Understanding High Availability 20-19

20.3.3.5 DURATION Clause and Non-Event Detection

You must use application time if Oracle CQL queries contain a DURATION clause for non-event detection. For more information, see: ■ Section 20.3.3.6, Prefer Application Time ■ DURATION Clause in the Oracle Complex Event Processing CQL Language Reference

20.3.3.6 Prefer Application Time

In Oracle CEP each event is associated with a point in time at which the event occurred. Oracle CQL recognizes two types of time: ■ Application time: a time value assigned to each event outside of Oracle CQL by the application before the event enters the Oracle CQL processor. ■ System time: a time value associated with an event when it arrives at the Oracle CQL processor, essentially by calling System.nanoTime. Application time is generally the best approach for applications that need to be highly available. The application time is associated with an event before the event is sent to Oracle CEP, so it is consistent across active primary and secondary instances. System time, on the other hand, can cause application instances to generate different results since the time value associated with an event can be different on each instance due to system clocks not being synchronized. You can use system time for applications whose Oracle CQL queries do not use time-based windows. Applications that use only event-based windows depend only on the arrival order of events rather than the arrival time, so you may use system time in this case. If you must use system time with Oracle CQL queries that do use time-based windows, then you must use a special Oracle CEP high availability input adapter that intercepts incoming events and assigns a consistent time that spans primary and secondary instances. 20-20 Oracle Complex Event Processing Developers Guide 21 Configuring High Availability 21-1 21 Configuring High Availability This chapter describes how to configure high availability for your Oracle CEP application depending on the quality of service you require, including: ■ Section 21.1, Configuring High Availability Quality of Service ■ Section 21.2, Configuring High Availability Adapters For more information on high availability options, see Chapter 20, Understanding High Availability .

21.1 Configuring High Availability Quality of Service

You configure Oracle CEP high availability quality of service in the EPN assembly file and component configuration files. For general information about these configuration files, see: ■ Section 1.1.4, EPN Assembly File ■ Section 1.1.5, Component Configuration Files This section describes: ■ Section 21.1.1, How to Configure Simple Failover ■ Section 21.1.2, How to Configure Simple Failover With Buffering ■ Section 21.1.3, How to Configure Light-Weight Queue Trimming ■ Section 21.1.4, How to Configure Precise Recovery With JMS For more information on configuring an Oracle CEP high availability application for scalability, see Section 20.1.4, High Availability and Scalability .

21.1.1 How to Configure Simple Failover

You configure simple failover using the Oracle CEP buffering output adapter with a sliding window size of zero 0. This procedure starts with the example EPN that Figure 21–1 shows and adds the required components to configure it for simple failover. Example 21–1 shows the corresponding EPN assembly file and Example 21–2 shows the corresponding component configuration file. Note: After making any Oracle CEP high availability configuration changes, you must redeploy your Oracle CEP application. See Section 24.5, Deploying Oracle CEP Applications .