I'm trying to develop a Windows Service that will consume a queue using a listener.
This works fine if I set this up as a console application with the Console.Writeline in bold below.
If I remove this i will not run.

Does some on have an example of how to write a Windows Server using Listeners or help with this issue?

Simple Listener method.

public static void StartListener()
string URI = "tcp://";
string DESTINATION = "oracle.queue";

ConnectionFactory connectionFactory = new ConnectionFactory(URI);

using (SimpleMessageListenerContainer listenerContainer = new SimpleMessageListenerContainer())
listenerContainer.ConnectionFactory = connectionFactory;
listenerContainer.DestinationName = DESTINATION;
listenerContainer.MessageListener = new Listener();
_logger.Trace("Listener started.");
catch (Exception ex)