Francesco, Thanks for providing this information. I think there's a couple of things going on and I'd like to work with you to create some reproducers, we could have a chat IRC #apache-activ...@freenode.net and I'll see if I can recreate your env / case in our test suite.
With the case above, the mosquitto client is sending a subscribe frame on every connection. Artemis is then treating this as a new subscription (even though the subscription queue already exists), and is copying over the retain messages. It's a reasonably trivial change, I should have a fix for you shortly. Thanks Martyn On Fri, Feb 3, 2017 at 11:39 AM, francesco81 <francesco.padov...@bticino.it> wrote: > Hi Clebert, > ok, we will build some junit tests to replicate the problem, follwing the > exemple section. > Meanwhile, I can confirm to you the bug(s): it seems that the reference to > the message is never removed from the queue. If the message is not retained > it persists 1 reference on the queue and every time my client reconnect to > the broker it will receive always the same message. If the message is > retained is even worse, because it goes to increment the references on the > queue and every time the client connects to the broker it will receive n + > 1 > times the same retained message where n is the re-connection number n. > Following a simple test I made by using mosquitto client: > > CLIENT 1 (publisher): > mosquitto_pub -h <host> -q 1 -i <client_id_pub> -t > /cro/plantid/0000000/gwid/00001/device_state -m "test non retained" > > CLIENT 2 (subscriber): > 1 connection: > mosquitto_sub -h <host> -q 2 -i <client_id_sub> -t > /cro/plantid/0000000/gwid/00001/device_state > --> received: > *test non retained* > 2 connection: > mosquitto_sub -h <host> -q 2 -i <client_id_sub> -t > /cro/plantid/0000000/gwid/00001/device_state > --> received again: > *test non retained* > 3 connection: > mosquitto_sub -h <host> -q 2 -i <client_id_sub> -t > /cro/plantid/0000000/gwid/00001/device_state > --> received again: > *test non retained* > ... > and so on > > CLIENT 1 (publisher): > mosquitto_pub -h <host> -q 1 -i <client_id_pub> -r -t > /cro/plantid/0000000/gwid/00001/device_state -m "test retained" > > CLIENT 2 (subscriber): > 4 connection: > mosquitto_sub -h <host> -q 2 -i <client_id_sub> -t > /cro/plantid/0000000/gwid/00001/device_state > --> received: > *test retained > test non retained > test retained* > 5 connection: > mosquitto_sub -h <host> -q 2 -i <client_id_sub> -t > /cro/plantid/0000000/gwid/00001/device_state > --> received: > *test retained > test non retained > test retained > test retained* > 6 connection: > mosquitto_sub -h <host> -q 2 -i <client_id_sub> -t > /cro/plantid/0000000/gwid/00001/device_state > --> received: > *test non retained > test retained > test retained > test retained > test retained* > ... > and so on. > > If you agree, I would open a bug for this. > > Francesco > > > > -- > View this message in context: http://activemq.2283324.n4. > nabble.com/ARTEMIS-bad-performance-behaviour-after-7-10-days-of-usage- > tp4721272p4721562.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >