0

I implemented group chat using mucSub feature given by ejabberd.

As for now the messages that have sent to the muc room are storing in the mnesia database, whenever I restart the server message history is getting lost. I need them to be stored in mysql. I want to be able to retrieve muc room history at any point of time just like whats app.

This is my mod_mam and mod_muc configuration:

mod_mam:
   default: always
   db_type: sql
mod_muc:
 db_type: sql
 access:
   - allow
 access_admin:
   - allow: admin
 access_create: muc_create
 access_persistent: muc_create
 default_room_options:
   mam: true
   persistent: true

Anyone please help me out of this..Thank you

0

whenever I restart the server message history is getting lost

Yes, the history of recent room messages is stored in RAM, and gets lost when the server stops. That is a feature provided by mod_muc as documented in XEP-0045. As you notice, that recent history is lost, so in your case it's better to focus in mod_mam, which implements XEP-0313 and mesages are stored persistently in database.

As for now the messages that have sent to the muc room are storing in the mnesia database

With that configuration you see the new messages sent to the room stored in the 'archive_msg' table of Mnesia?

I tried your configuration with ejabberd 18.12, and the messages are stored correctly in the 'archive' MySQL table, not in 'archive_msg' table of Mnesia.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.