public void sendBufferAndEvent(Buffer buffer, AbstractEvent event) throws IOException, InterruptedException {
checkStatus();
Envelope envelope = createNextEnvelope();
envelope.setBuffer(buffer);
envelope.serializeEventList(Arrays.asList(event));
this.envelopeDispatcher.dispatchFromOutputChannel(envelope);
}
// -----------------------------------------------------------------------------------------------------------------
// Event processing