How to configure VerneMQ Docker container uses PostgreSQL for storage instead of Google's LevelDB

Hi All

Can you please let us know how to configure VerneMQ Docker container uses PostgreSQL for storage instead of Google’s LevelDB.

Thank you for your help

Regards, Bao

1 Like

Hi Bao,

You can only use PostgreSQL as a vmq_diversity plugin, that is, as an authentication/authorization plugin. You’ll store ClientID/Username/Password/ACLs in PostgreSQL.

I’m not sure this is what you are asking, though. PostgreSQL cannot be used for storing messages, that is to replace LevelDB as an internal persistence layer.

2 Likes

Hi @afa

Thank you for confirm that PostgreSQL cannot be used for storing messages instead of LevelDB.

Regards, Bao

@afa

And Firestore, can it be used to store msg?

1 Like

@maykonfpp You can build a VerneMQ plugin that exports messages to Firestore. The plugin will have to speak to some Firestore API and decide which of the messages will be forwarded.

We cannot use Firestore as a means of internal message persistence (ie. as a replacement for LevelDB), as Firestore is a closed-source cloud database.

1 Like

Do you have any documentation on how to create this plug-in?

Documentation on plugin development is here:

Depending on your previous knowledge of VerneMQ and Erlang/OTP this will require some effort.

1 Like