0
votes

When broker has one publisher and subscriber (via MQTT) there are no messages in persistance. I tested in LevelDB and MySQL. In LevelDB was only topics name. Maybe configuration was wrong or I need another persistance? Maybe MQTT messages not writes to message storage?

My task is get publishe/subscriber id's. How can I do this, maybe some of this:

  • get another persistance, such KahaDB with archiveDataLogs=true or high performance journal?
  • configured 'correctly' persistance?
  • get some logs or journal of broker?
  • write plug-in and get this data from RAM?

Version 5.9.

LevelDb configurtion:

 <persistenceAdapter>
  <LevelDB directory="${activemq.data}/leveldb"/>
 </persistenceAdapter>

Now, I tried to get log archive in KahaDB? but no result. Archive folder empty:

<persistenceAdapter>
  <kahaDB directory="${activemq.data}/kahadb" archiveDataLogs="true" directoryArchive="${activemq.data}/datalog"/>
 </persistenceAdapter>

Thanks.

1
please post the version you are using and some configuration or code with your question or no one is going to be able to help you. - Martin Serrano

1 Answers

0
votes

I'm no expert in ActiveMQ but I think this could be pretty hard to achieve. Is using ActiveMQ a hard requirement for you or can you change the product?

If ActiveMQ isn't a hard reuqirement, an alternative might be to use a full-featured MQTT broker which explicitly allows to do message interception such as HiveMQ. With the plugin system it's perfectly possible to intercept messages, extract things and save it to a database of choice (be it SQL or NoSQL). You can find a blog post with a big picture how this would work here.

The documentation for the plugin system can be found here.

Please note that I may be biased since I work on HiveMQ.