Zmq app

I don't see the need for defining a function. If it is the only place where it is used and the function is called right after, why not just use inline code?