split function (rabbitmq), add friend function