While the use of an EventPartitioner
has been superseded to some extent with the newer capabilities in Oracle Event Processing for enabling concurrency in a single event processor instance, it is still worthwhile mentioning this important capability.
Typically, you can partition events onto threads upstream to the channel, and in the following example, we have two threads each carrying a subset of the input "stock symbols". In this particular case, the channel partitions the input events by hashing the specified property "symbol". This means that events containing the same value for symbol will be partitioned always to the same processor. The hash function used is one that minimizes the number of collisions. The result of the hash is then divided by the number of listeners and the remainder used to select the proper listener. This can effectively reduce lock contention in the processors because each one will get fewer events, and there is no lock shared across...