Configuring Ejabberd to use an external component (with XEP-0114)

I'm developing a system that uses XMPP for real-time communication between a mobile app and my server. It's purpose is different to instant-messaging, so I'm trying to develop an external component that processes the XMPP messages and send out new ones.

I have been attempting to use SleekXMPP ( to create an external component (following XEP-0114).

However I'm having difficulty communicating between my Ejabberd server and the component. I've been trying to build a simple Echo component (it repeats what users send to it) just to learn how to make and connect a component in Ejabberd.

I suspect the problem lies within the component I've created. I've added this to 'LISTENING PORTS' in ejabberd.cfg file (and then restarted ejabberd).

  {5237, ejabberd_service, [{hosts, [""],
                               [{password, "mypass"}]}

The component is a Python script running on the same machine as the server. Is this all I need to do in Ejabberd to add the echo component?

(The script it is quite similar to the one here:

I am unable to add when logged into the server from an XMPP client - it says adding contact but it does not show up in the roster on the client.

Is there anything non-obvious about setting up an external component to work with Ejabberd, something I may have missed? Or do you know of a simple echo bot component I could use for testing?

I apologize if my question is vague, I am beginner developer of Ejabberd, please let me know what areas should have more detail.

Thank you.

I imagine you have in

I imagine you have in ejabberd.cfg
{hosts, [""]}.

If you have enabled mod_echo, then the JID "" is already used by ejabberd for mod_echo. I recommend you to disable mod_echo.

Then, start ejabberd, and then start your component. Check if ejabberd shows anything in the log.

Then login to an account using Psi, Gajim or Jabbim. And in that client open the "Service Discovery", to check if your component "" is displayed or not.

thx for the info above, that

thx for the info above, that help me figure out my issue to use rabbitmq-xmpp

Syndicate content