[Standards] XEP for using XMPP as a "Enterprise Message Queue"

Jacob Burkhart igotimac at gmail.com
Thu Jan 31 14:18:25 CST 2008


Hi,

I'm looking for some suggestions (or perhaps I'm looking to write my own
XEP) for a standard way to allow XMPP to act like a message queue.

Allow me to explain my current hack, and then perhaps some 'better ideas'
will follow.

There are 2 types of users on my Closed jabber network.  Let's call them,
"service clients" and "service providers".

Service Clients, are sometimes logged in, and sometimes not, but never
logged in more than once.  They
send messages to Service Providers asking for various things, and are setup
to receive messages that the Service Provides send.   Pretty standard usage
of XMPP from the Service Clients perspective.

Service Providers, are almost always logged in, and logged in many many
times.  Each instance of a Service Provider logs in with the same JID but
uses a different resource.  Service Providers provide message processing
services to the clients. As such, for a message sent by a client for a given
service, it should be designated to ONE Service Provider (matching the to:
JID) to handle this message.
  This is the first problem, with a single JID logged on at multiple
resources, we want delivery to be made to only ONE of them, not all of them.
Also, Service Providers may take some time to process a message, so after
recieving a message there must be some mechanism for the Service Provider to
tell the Jabber server that it is finished processing and ready to recieve
more messages.  We don't want messages to queue up at the Service Provider
level, we want them to Queue up on the Jabber server.  This does not match
well with any XEP I've read so far...

HACK solution:

In Our custom patch of Djabberd, Service Providers are recognized by the
fact that they send a special presence message when they come online.  The
jabber server will then immediately mark a given instance of a service
provider as offline as soon as it delivers a message to it.  And then when
the Service Provider is finished processing it sends another presence
message to signify it is online and available to receive messages again.

IDEAL solution:

I imagine the correct thing to do here is to have some sort of features
negotiation between server and service provider clients that turns on a
special form of message acknowledgments. With this turned on, the
appropriate behavior of the jabber server should be to wait for an
Acknowledgment after each message sent before sending the same Service
Provider another message.  The behavior could be extended even further and
have server time-out on an acknowledgment in which case it would assign
another available service provider matching the TO of the message to deliver
to.  Going further down this path eventually leads us to a state where we
can have guaranteed reliable messaging.  Wherein a given Service Client can
be sure that a message it sends will be processed by one and only one
instance of the Service Provider.

thanks,
Jacob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.jabber.org/pipermail/standards/attachments/20080131/14375c38/attachment.htm 


More information about the Standards mailing list