private void OnShimMessage(object sender, NetMQSocketEventArgs e) { string command = e.Socket.ReceiveFrameString(); if (command == PublishMessageCommand) { // just forward the message to the publisher NetMQMessage message = e.Socket.ReceiveMultipartMessage(); _publisherSocket.SendMultipartMessage(message); } else if (command == NetMQActor.EndShimMessage) { // we got dispose command, we just stop the poller _poller.Stop(); } }