3

I was trying ejabberd (the latest version on the ProcessOne site) on Ubuntu Linux and configured it to store data in a MySQL database.

When I add users I can see them in the users table but nothing about muc rooms appears in any of the tables.

Looking at the guide it was not clear if ejabberd supports this. I need easy access to muc room information in the database because other parts of our system are going to use this data.

Does ejabberd (I am using v15.03) support storing muc room info (room jid ,room subjects and room chat history) in an external database such as MySQL? If not, what about Openfire? Would you recommend Openfire on this?

Mickaël Rémond
  • 9,035
  • 1
  • 24
  • 44
musimbate
  • 347
  • 6
  • 25

3 Answers3

2

ejabberd supports SQL backend for MUC. You need to configure mod_muc to use proper db_type. Please refer to mod_muc ejabberd documentation

Please note that:

  • MUC room configuration is only stored in database for persistent chat room. Make sure your rooms are configured accordingly if you want them to be store.
  • Short term history is kept in memory. This is what is automatically resent when user joins a MUC room.
  • Message archive rely on XEP-0313: Message Archive Management XMPP extensions. Make sure it is enable and configured appropriately to store content in database. Please read ejabberd documentation on mod_mam
Mickaël Rémond
  • 9,035
  • 1
  • 24
  • 44
2

To store muc rooms in MySQL, modify the configuration file of ejabberd as follows:

mod_muc:
   db_type: sql  
   default_room_options:
       persistent: true

To see stored rooms, then goto MySQL database and use the following query:

>select * from muc_room;
KSR
  • 1,699
  • 15
  • 22
1

I don't know about ejabberd, but Openfire provide the information you need. Room info will be stored in mysql (or other DB if you want).

With the Monitoring Plugin which you can get here: https://www.igniterealtime.org/projects/openfire/plugins.jsp you can also store the muc room messages in your database.

Roman S.
  • 1,206
  • 15
  • 24