[ejabberd] How to queue outgoing stanzas from a webapp
rduke496 at gmail.com
Fri May 18 22:44:24 MSK 2018
I have a (Django) web application in which (based on user events) I want to
queue outgoing event/notification stanzas to XMPP users.
I'm trying to determine the best way to do this. Options I've considered
1. do a API call to the ejabberd REST API (send_stanza / send message)
based on user action
2. do the above in an async worker (Celery or similar)
3. something else. e.g. offline store uses postgres (spool table). Could
I insert outgoing messages into this? this would be very convenient and
lightweight but how would I ensure those messages were flushed out to users
if they were currently connected to the ejabberd?
4. is there anytihg else like a plugin which sends stanzas based on a DB /
I am currently doing #1 but I'd rather not have any failure to call the API
(e.g. XMPP server is down for maintenence) cause web application users to
experience delays / errors. #2 is viable but is extra moving parts I'd
rather avoid and still no clear
Any insights appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ejabberd