I\'m using ActiveMQ to send and receive messages using a C# app. However I\'m having some difficulty just getting a count of the messages in the queue.. Here\'s my code:
I don't have an ActiveMq with me right now so I can not try it but I think the problem is you are not starting the connection. Try like this :
using (IConnection connection = factory.CreateConnection())
{
connection.start ();
using (ISession session = connection.CreateSession())
{
//Whatever...
}
}