[ejabberd] why is mod_offline.handle_info implemented?

Gaurav Jain monkeyfdude at gmail.com
Sun Mar 1 21:36:24 MSK 2015

If you could just help me understand (last few questions)

gen_mod:get_module_proc(To#jid.lserver, ?PROCNAME) !

* what does get_module_proc do?

* The process was sent To#jid.lserver and not From#jid because the
offline_message needs to be stored for this To#jid.....right

* And I assume, in this process there is no state. So it is just a worker
process that has a queue of offline_messages to store against their
corresponding To#jid.....right?

* main mod_offline just hands storage to this process and goes back to
receiving more messages from ejabberd itself.

On Sun, Mar 1, 2015 at 10:28 AM, Holger Weiß <holger at zedat.fu-berlin.de>

> * Gaurav Jain <monkeyfdude at gmail.com> [2015-03-01 09:47]:
> > You note in the end "*Whether or not it would be a good idea depends on
> > your module*" has got me worried/scared but I think I will crash and
> learn.
> A good reason to run stuff in a separate (gen_server) process would be
> the requirement to maintain some state in that process.  Other reasons
> might be that the offline messages should be handled asynchronously
> and/or sequentially.
> Holger
> _______________________________________________
> ejabberd mailing list
> ejabberd at jabber.ru
> http://lists.jabber.ru/mailman/listinfo/ejabberd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20150301/155d428a/attachment.html>

More information about the ejabberd mailing list