MessageCount is the number of currently undelivered messages.
MessagesAdded is the cumulative total of messages added to the queue since it was created.
When I reattempted what I was trying to do I could get message count to behave as I was expected. In particular I made sure to seting the ack batching in my consume/producer session to 0 .
session = sf.createSession(
null, // user name
null, // password
false, // xa semantics
true, // auto commit sends
true, // auto commit acks
false, // pre-ack
0 // ack batch size
By the way I could not find the MessagesAdded propery in the QueueQuery class, does this property come from somewhere else?