RE: ACTIVEMQ_ACKS not removing old consumers
I think the solution will be to set my own clientid when making connection to the topic like this.
_connection = _connnectionFactory.CreateConnection(queueUser, queuePwd);
_connection.ClientId = "MY OWN ID";
_session = _connection.CreateSession(AcknowledgementMode.AutoAcknowledge
This way everytime I restart consumer app no new rows are added to ACTIVEMQ_ACKS table.
Correct me if I'm wrong.
From: Tunikov, Eugeniy
Sent: 12. juli 2018 12:45
To: 'users@xxxxxxxxxxxxxxxx' <users@xxxxxxxxxxxxxxxx>
Subject: ACTIVEMQ_ACKS not removing old consumers
Hello. I am having problems with messages(in topic) not being removed from memory after they are consumed.
I found out that it is because broker is waiting for consumers(which don't exist anymore). The ACTIVEMQ_ACKS table holds records to my previous consumers and never removes them.
Basicly every time I restart the broker application and consumer application a new consumer(with new CLIENT_ID) is added to the ACTIVEMQ_ACKS table and the old once are not removed so the broker keeps all the incoming messages in memory.
What is the best practice to solve this? Any way to the tell broker to remove old consumers from the table?