Correlating Output Adapter EPN Assembly File Configuration

Understanding Scalability 22-3 Optionally, you can create your own event partitioner instance and configure a channel to use it instead to customize how events are dispatched to the channel’s listeners. For more information, see: ■ Section 23.1.1, How to Configure Scalability With the Default Channel EventPartitioner ■ Section 23.1.2, How to Configure Scalability With a Custom Channel EventPartitioner

22.2.1.2 EventPartitioner Load Balancing

When using an event partitioner channel, if you want to perform load balancing, then each listener must be identical. Otherwise, listeners need not be identical.

22.2.1.3 EventPartitioner Initialization

By default, the Oracle CEP server initializes each event partitioner on deployment and will re-initialize event partitioners on re-deployment by invoking the EventPartitioner method activateConfiguration is before ActivatableBean.afterConfigurationActive and before your EventPartitioner class’s partition method is invoked.

22.2.1.4 EventPartitioner Threading

Table 22–1 lists the threading options you can use with an event partitioner channel.

22.2.1.5 EventPartitioner Restrictions

When configuring a channel to use an event partitioner, consider the following restrictions: ■ Batching is not supported when you configure a channel with an event partitioner. Table 22–1 Event Partitioner Channel Threading Options Threads Allocated In Description When to Use Channel ■ Channel max-threads set to the number of listeners. Usually acceptable if conversion of the external message format into the internal event format is inexpensive. Lets the multithreading be controlled at the channel granularity. Some channels may require a higher number of threads than others due to differences in volume. Adapter ■ Channel max-threads set to 0. ■ Implement a multi-threaded adapter with at least on thread per partition listener. Usually preferable if conversion of the external message format into the internal event format is expensive. This approach is best when the adapter is multithreaded and the inbound event rate is high enough that the adapter becomes a bottleneck unless multiple threads can be used to scale the inbound processing. Note: In either approach, event order cannot be guaranteed. This is true whenever multiple threads are used. 22-4 Oracle Complex Event Processing Developers Guide For more information, Section 9.1.6, Batch Processing Channels .

22.2.2 ActiveActiveGroupBean

Using the com.oracle.cep.cluster.hagroups.ActiveActiveGroupBean, you can partition an incoming JMS stream in Oracle CEP applications by utilizing the notification groups that the ActiveActiveGroupBean creates. You add an ActiveActiveGroupBean to your EPN assembly file as Example 22–1 shows. Example 22–1 ActiveActiveGroupBean bean Element bean id=clusterAdapter class=com.oracle.cep.cluster.hagroups.ActiveActiveGroupBean bean By default, the ActiveActiveGroupBean creates notification groups named: ActiveActiveGroupBean_X Where X is a string. At runtime, the ActiveActiveGroupBean scans the existing groups defined on the Oracle CEP server and applies a default pattern match of: ActiveActiveGroupBean_\\w+ When it finds a match, it creates a notification group of that name. Optionally, you can define your own cluster group pattern match as Section 23.2.3, How to Configure the ActiveActiveGroupBean Group Pattern Match describes. This section describes: ■ Section 22.2.2.1, Scalability in an Oracle CEP Application Using the ActiveActiveGroupBean Without High Availability ■ Section 22.2.2.2, Scalability in an Oracle CEP Application Using the ActiveActiveGroupBean With High Availability For more information, see: ■ Section 20.1.2, Deployment Group and Notification Group ■ Section 23.2, Configuring Scalability With the ActiveActiveGroupBean 22.2.2.1 Scalability in an Oracle CEP Application Using the ActiveActiveGroupBean Without High Availability You can use the ActiveActiveGroupBean to partition an incoming JMS event stream by selector in an Oracle CEP application that is not configured for high availability. Consider the multi-server domain that Figure 22–2 shows.