Apama 10.15.0 | Developing Apama Applications | Developing Apama Applications in EPL | Testing and Tuning EPL Monitors | Handling slow or blocked receivers
 
Handling slow or blocked receivers
You can use correlator diagnostic output to identify slow or blocked receivers.
*The oc (number of events on the output queue) can grow to 10,000 maximum. If you see a steady trend that it is growing, it probably indicates a slow receiver.
*The tx (number of events transmitted) should always be increasing. If it is static, or not increasing as fast as it should, it probably indicates a slow receiver.
Slow receivers include:
*Receivers that are not consuming events as quickly as the correlator is generating them.
*Blocked receivers that are not accepting new events.
When the correlator's output queue fills, operations that are sending events from the processing thread (or threads, if there is more than one context) are blocked. If the output queue remains filled, and the processing thread(s) remain blocked, the input queue(s) start(s) to fill. Events are never dropped.
If you specify the -x correlator option when you start the correlator, it causes the correlator to disconnect any receiver that becomes slow. If you discover that your application is producing events at too high a rate for a particular receiver you might be able to publish the events to separate channels so that the receiver needs to handle fewer events. Alternatively, or in addition, you might be able to modify your application to throttle the rate at which it sends events to this receiver.
If you cannot speed the receiver up, or install faster hardware, you can partition the correlator's output event flow into channels so that the receiver needs to handle fewer events. Alternatively, you can use throttling in the correlator to output events less frequently.
See also Determining whether to disconnect slow receivers.