@Override
    public void receive(long timestamp, Object[] data) {
        List<ReturnEventHolder> returnEventHolderList = new ArrayList<>(eventSequence.length);
        synchronized (patternSyncObject) {
            try {
                multiProcessReturn.set(new ReturnEventHolder());
                stabilizeStates(timestamp);
                for (int anEventSequence : eventSequence) {
                    StreamEventConverter aStreamEventConverter = streamEventConverters[anEventSequence];
                    StreamEventFactory aStreamEventFactory = streamEventFactorys[anEventSequence];
                    StreamEvent newEvent = aStreamEventFactory.newInstance();
                    aStreamEventConverter.convertData(timestamp, data, 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