[rabbitmq-discuss] RabbitMQ xmpp gateway

Tony Garnock-Jones tonyg at lshift.net
Wed Jan 20 16:06:29 GMT 2010

Hi Chetna,

Chetna Kaur wrote:
> 1) The gateway doesn't handle loss of connection to the ejabberd server.

You mean the rabbitmq server? Yes, that's an outstanding issue for sure.
If you fix this, your patch would be very welcome :)

> 2) Consumer Processes are not supervised ( I believe this may be on your
> To-do list).
> If I understand correctly, once a consumer process crashes the user
> associated with the queue will no longer receive any data. This data
> would continue to queue up at the server. Even if the user were to go
> offline and come back online, because of an entry in
> rabbitmq_consumer_process with queue and pid, a new process will not be
> created. Am I missing something here?

It's been a while since I looked at the code. Yes, the mnesia table will
cause problems.

There's also another bug I know of: if the system is up and working, and
I restart ejabberd, it used to ping presence for all the people it was
supposed to be in touch with. When the replies came in, consumer
processes would be started. However, it no longer seems to do the
initial ping reliably. I haven't investigated the problem though: I have
been lazily working around it by signing out and in of chat to
explicitly issue presence notifications to the rabbit-ejabberd.

> What would be the best way to make these processes supervised?

Split out the consumer process into a separate gen_server, introduce a
supervisor, and make the mnesia management more robust (probably by
trapping exits and putting cleanup code in the new gen_server's


More information about the rabbitmq-discuss mailing list