Hi,
I have an embedded Artemis 2.27.1 broker with jvm local connections in a
spring boot app. I believe that the metrics for artemis_message_count of
two queues are wrong. They never go below a certain base threshold, in one
case 146, in the other 86. Not much, but annoying nontheless.
The problem has persisted over several jvm restarts and for several weeks now.
I see nothing relevant in the logs. It started when I was running 2.26.0,
have upgraded to 2.27.1 and started using libaio instead of Nio since then.
The server is running Openjdk Temurin 19.0.1.
Is there anything I can do to encourage Artemis to perform a "recount" of
the messages that actually are persisted in the queues?
Here's my full configuration of the broker.
var dataDir = "/srv/activemq-data"
var metricsPlugin = new JmsMetricsPlugin(meterRegistry);
var config = new ConfigurationImpl()
.setPersistenceEnabled(true)
.setCreateJournalDir(true)
.setJournalDirectory("%s/journal".formatted(dataDir))
.setCreateBindingsDir(true)
.setBindingsDirectory("%s/bindings".formatted(dataDir))
.setPagingDirectory("%s/paging".formatted(dataDir))
.setLargeMessagesDirectory("%s/largemessages".formatted(dataDir))
.setJournalCompactMinFiles(2)
.setJournalPoolFiles(10)
.setJournalCompactPercentage(50)
.setSecurityEnabled(false)
.addAcceptorConfiguration("in-vm", "vm://0");
config.setMetricsConfiguration(
new MetricsConfiguration().setPlugin(metricsPlugin));
var settings = new AddressSettings()
.setAutoCreateDeadLetterResources(true)
.setAutoCreateExpiryResources(true)
.setAutoDeleteAddresses(false)
.setAutoDeleteCreatedQueues(false)
.setAutoDeleteQueues(false)
.setDeadLetterQueueSuffix(new SimpleString("dlq"))
.setExpiryQueueSuffix(new SimpleString("expiry"));
broker = ActiveMQServers.newActiveMQServer(config);
broker.getAddressSettingsRepository().setDefault(settings);
broker.start();
--
Fredrik Jonson