@Override
    public void receive(Event[] events) {
        List<ReturnEventHolder> returnEventHolderList = new ArrayList<>(eventSequence.length);
        synchronized (patternSyncObject) {
            for (Event event : events) {
                try {
                    multiProcessReturn.set(new ReturnEventHolder());
                    stabilizeStates(event.getTimestamp());
                    for (int anEventSequence : eventSequence) {
                        StreamEventConverter aStreamEventConverter = streamEventConverters[anEventSequence];
                        StreamEventFactory aStreamEventFactory = streamEventFactorys[anEventSequence];
                        StreamEvent newEvent = aStreamEventFactory.newInstance();
                        aStreamEventConverter.convertEvent(event, newEvent);
                        process(anEventSequence, newEvent);
                        if (multiProcessReturn.get() != null &&
                                multiProcessReturn.get().complexEventChunk != null) {
                            returnEventHolderList.add(multiProcessReturn.get());
                            multiProcessReturn.set(new ReturnEventHolder());
                        }
                    }
                } finally {
                    multiProcessReturn.set(null);
                }
            }
        }
        for (ReturnEventHolder returnEventHolder : returnEventHolderList) {
            outputRateLimiter.sendToCallBacks(returnEventHolder.complexEventChunk);
        }
    }
{StreamJunction.Receiver} implementation to receive events to be fed into multi
stream processors which consume multiple streams.
modules/siddhi-core/src/main/java/io/siddhi/core/query/input/MultiProcessStreamReceiver.java