Writing a message into the message queue

In this part of the recipe, we will learn how a server writes a desired message into the message queue.