print messages only if payload is not nil
consume messages faster
some changes to main