[jdev] Component disocnnection

Sylvain Hellegouarch sh at defuze.org
Sat Jan 22 10:23:16 CST 2011


Hi Julien,

On Sat, Jan 22, 2011 at 4:58 PM, Julien Genestoux <
julien.genestoux at gmail.com> wrote:

> Nope, sending </stream> won't cut it, because Ineed to component to clear
> out whatever messages are being processed.
>
> Basically, our components get hundreds of messages per second, some of them
> take up to a few seconds to be processed and some of them incur responses to
> be sent. What I want for the component is the ability to tell the server :
> please don't route any more messages to me, let me send a few more though.
> Makes sense?
>
>

No XEP will provide you with that behavior AFAIK. However, since you're
using ejabberd, you can obviously write somple simple ejabberd module (not
an external component) that would listen itself for specific stanzas from
your other components to do just that. If you look for it, you'll see you
can quite likely modify the ejabberd configuration held in mnesia in a
dynamic fashion. Your module would simply remove the configuration for that
component from the route table held by ejabberd. I'm pretty sure it's doable
but you'll need to write some erlang code and dive into the internals of
ejabberd :)

- Sylvain




-- 
- Sylvain
http://www.defuze.org
http://twitter.com/lawouach
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.jabber.org/pipermail/jdev/attachments/20110122/3d81e91f/attachment.htm>


More information about the JDev mailing list