Question

How does the Last-Value Property work in HornetQ?

I'm sending 4 elements to MyQueue just to test this property: 2 with a Last-Value Property defined, and the other 2 with a diferent Last-Value.

I thought that just 2 elements will be processed in the Queue: one of each Last-Value Property. But it doesn't seem to happen. The values in the JBoss JMX Console are like: MessageCount = -4, DeliveringCount = -4, MessagesAdded = 4. So, how does it works?

I'm using Jboss 5.1.0.GA, and I set the "last-value-queue" with true, in tue hornetq-configuration.xml file.

Was it helpful?

Solution

The messageCount being negative was an issue with last-value-queues that is being fixed on the next version.

https://issues.jboss.org/browse/HORNETQ-466

with this commit:

https://github.com/clebertsuconic/hornetq/commit/a78836cdef4e28d76064500f57cb8e8a799da9bf

Other than the negative counter, everything works as expected.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top