There are a couple of tests in the test suite which use both last-value and
non-destructive queue attributes (e.g. in
org.apache.activemq.artemis.tests.integration.amqp.JMSNonDestructiveTest).
These work without issue. I also took the code you pasted and tried to
reproduce the failure, but everything appears to be working as expected.
For what it's worth, I'm testing on the tip of the master branch (i.e.
2.10.0-SNAPSHOT).

Would it be possible for you to provide more details about how to reproduce
this failure? Perhaps some simple modifications to the last-value-queue
example distributed with the broker would suffice.


Justin

On Wed, Jul 3, 2019 at 4:44 PM mschmeiser <mschmei...@sasktel.net> wrote:

> Hello
>
> I am getting an error "AMQ224039: Failed to ack old reference:
> java.lang.IllegalStateException: Cannot find add info 5698 on compactor or
> current records" after every publish of a message to a Last Value Queue
> except the first time.
>
> I am on ActiveMQ Artemis 2.8.1. I know there's a more recent version but
> checked the release notes and none of the bug fixes looked like they'd be
> relevant to this.
>
> I'm not working with a deployment-ready system yet, this is very early
> stage
> prototyping. I have a single broker with the basic configuration, I'm
> basically running things 'out of the box'. The java code that I'm using
> looks something like:
>
> ***
>
> ActiveMQQueue destination = ActiveMQQueue.createQueue(subject +
> "?last-value-key=LVK&non-destructive=true");
>
> MessageProducer producer = session.createProducer(destination);
>
> TextMessage message = session.createTextMessage("test object");
> message.setStringProperty("LVK", "foo");
>
> Thread.sleep(500);
>
> session.createConsumer(destination, "LVK = 'foo'").setMessageListener(m ->
> processMessage(m));
>
> Thread.sleep(500);
>
> message = session.createTextMessage("test object 2");
> message.setStringProperty("LVK", "foo");
>
> producer.send(message);
>
> Thread.sleep(500);
>
> session.createConsumer(destination, "LVK = 'foo'").setMessageListener(m ->
> processMessage(m));
>
> ***
>
> The first time this code is run, I only get the error when the message is
> sent the second time. After that, the error happens twice per run. If I go
> into the broker console and purge the queue, then the first message send
> works fine, error is thrown every subsequent time.
>
> The stack trace (I'm not able to copy/paste from my development
> environment)
> looks like:
>
> JournalImpl.checkKnownRecordID(JournalImpl.java:1074)
> JournalImpl.appendUpdateRecord(JournalImpl.java:881)
> Journal.appendUpdateRecord(Journal.java:98)
>
> AbstractJournalStorageManager.storeAcknowledge(AbstractJournalStorageManager.java:425)
> QueueImpl.acknowledge(QueueImpl.java:1533)
> LastValueQueue.acknowledge(MessageReferenceImpl.java:235)
> MessageReferenceImpl.acknowledge(MessageReferenceImpl.java:235)
> LastValueQueue.replaceLVQMessage(LastValueQueue.java:172)
> LastValueQueue.addTail(LastValueQueue.java:107)
> ...
>
> Tracing it back that far, it looks like the failed acknowledge shouldn't
> cause major problems for the functionality of the system. The code is all
> executing as you'd expect it to and the queue on the broker always has the
> expected message in it. The error is still a concern though simply as a
> matter of performance - scalability is a concern for me and the overhead of
> logging a bunch of errors would be a problem.
>
> Let me know if there's any other information I can provide that could help
> diagnose this issue.
>
> Thanks,
> Matt
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>

Reply via email to