Description
We have the following setup:
MQTT client (reproducible with at least mosquitto and fusesource) with cleanSession = false and QOS = 1 (important!)
AMQ with authentication/authorization plugin
<plugins> <statisticsBrokerPlugin/> <simpleAuthenticationPlugin> <users> <authenticationUser username="${activemq.username}" password="${activemq.password}" groups="admins,everyone"/> <authenticationUser username="mcollective" password="secret" groups="mcollective,admins,everyone"/> </users> </simpleAuthenticationPlugin> <authorizationPlugin> <map> <authorizationMap> <authorizationEntries> <authorizationEntry queue=">" write="admins" read="admins" admin="admins" /> <authorizationEntry topic=">" write="admins" read="admins" admin="admins" /> <authorizationEntry topic="mcollective.>" write="mcollective" read="mcollective" admin="mcollective" /> <authorizationEntry queue="mcollective.>" write="mcollective" read="mcollective" admin="mcollective" /> <authorizationEntry topic="ActiveMQ.Advisory.>" read="everyone" write="everyone" admin="everyone"/> </authorizationEntries> </authorizationMap> </map> </authorizationPlugin> </plugins>
No problem to connect for the first time, but when reconnecting with the same client ID, the connection fails each time:
2014-10-16 11:20:41,120 [MQ NIO Worker 3] WARN Transport - Transport Connection to: tcp://10.0.2.2:49479 failed: org.apache.activemq.transport.mqtt.MQTTProtocolException: Error recovering retained messages for m2mbox.macbookx.schedule: org.apache.activemq.security.AuthorizationDestinationFilter cannot be cast to org.apache.activemq.broker.region.Topic