fix batch event processor to be a thread himself
fix batch event processor tests