public void consumer_Listener(IMessage message) { ActiveMQTextMessage m = message as ActiveMQTextMessage; Tracer.DebugFormat("Received Message: {0} delivery count = {1}", m.Text, m.RedeliveryCounter); Assert.AreEqual("1st", m.Text); Assert.AreEqual(receivedCount.Value, m.RedeliveryCounter); receivedCount.GetAndSet(receivedCount.Value + 1); done.countDown(); }