Fixing behaviour in Producer/Consumer for work with bufferEvents array;

Signed-off-by: willmendesneto <willmendesneto@gmail.com>