@Override
    public void send(ComplexEventChunk complexEventChunk, int noOfEvents) {
        if (getSiddhiDebugger() != null) {
            getSiddhiDebugger()
                    .checkBreakPoint(getQueryName(), SiddhiDebugger.QueryTerminal.OUT, complexEventChunk.getFirst());
        }
        complexEventChunk.reset();
        if (complexEventChunk.getFirst() != null) {
            String flowId = SiddhiAppContext.getPartitionFlowId();
            SiddhiAppContext.stopPartitionFlow();
            try {
                while (complexEventChunk.hasNext()) {
                    ComplexEvent complexEvent = complexEventChunk.next();
                    if (complexEvent.getType() == ComplexEvent.Type.EXPIRED) {
                        complexEvent.setType(ComplexEvent.Type.CURRENT);
                    }
                }
                publisher.send(complexEventChunk.getFirst());
            } finally {
                SiddhiAppContext.startPartitionFlow(flowId);
            }
        }
    }
Implementation of {@link OutputCallback} to receive processed Siddhi events from partitioned
Siddhi queries and put them into {@link StreamJunction}.
modules/siddhi-core/src/main/java/io/siddhi/core/query/output/callback/InsertIntoStreamEndPartitionCallback.java