Message queue programming problem done for a interview.