[ejabberd] Server Component not receiving all MUC messages
pasquale.puzio at gmail.com
Sat Feb 29 19:36:42 MSK 2020
we want to build a simple *server component* which *receives all messages
sent to MUC rooms* (we have thousands of rooms and new ones are being
created all the time) and, after processing some of these messages,
performs some operations.
We don't want our server component to act like a bot, so we don't want it
to reply to messages or things like that, we just want to receive copies of
messages in order to process some of them.
*To do so, we have followed the tutorial available
The problem is that *the component seems to receive only some of the
messages* (approximately 1 out of 5).
Also, we are observing a weird behavior: message delivery seems to be
"exclusive", meaning that a message is delivered either to clients or to
the server component, which is weird. In other words, 1 message out of 5 is
delivered to the server component, and the remaining 4 are delivered to
clients as usual.
Here's our component code (*we have tried with both sleekxmpp and slixmpp
but we always have the same behavior*):
#from sleekxmpp.componentxmpp import ComponentXMPP
from slixmpp.componentxmpp import ComponentXMPP
if sys.version_info < (3, 0):
from sleekxmpp.util.misc_ops import setdefaultencoding
raw_input = input
", "secret", "jabber.ourservice.it", 5233)
# add handler
def message(self, msg):
if msg['type'] == 'groupchat':
print('Received group chat message')
print('Received another message')
if __name__ == '__main__':
xmpp = NotificationsComponent()
xmpp.register_plugin('xep_0030') # Service Discovery
#xmpp.register_plugin('xep_0004') # Data Forms
#xmpp.register_plugin('xep_0060') # PubSub
xmpp.register_plugin('xep_0199') # XMPP Ping
#xmpp.register_plugin('xep_0045') # MUC
# Connect to the XMPP server and start processing XMPP stanzas.
and here's a snippet of our *ejabberd 18.03 *configuration:
## dhfile: 'DHFILE'
## ciphers: 'CIPHERS'
## To enforce TLS encryption for client connections,
## use this instead of the "starttls" option:
## Stream compression
# "/ws": ejabberd_http_ws
# "/bosh": mod_bosh
# "/api": mod_http_api
## "/pub/archive": mod_http_fileserver
## register: true
we have also tried to play with access, privilege_access and things like
that but no luck.
Of course, we have enabled debug logs on both sleekxmpp and ejabberd, but
we don't see any errors, it's just that messages are missing.
We did one more test. Even by using the official echo component example
available in the repository, we have the same issue. So it looks like there
is some issue at our server, maybe.
Do you have any idea what might cause this weird behavior? Is there any
particular plugin or module that should be enabled?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ejabberd