[rabbitmq-discuss] Client connect/disconnect events on the server side

Benjamin Renaud br at versly.com
Tue Mar 15 20:05:10 GMT 2011


Hi Matthias,

Yes presence is a very application-specific bit of information.

Being notified of when a client connects or disconnect (even if rabbit
tries to auto-reconnect or other nice features under the covers) would
help application developers develop their own notion of presence.

In other words, rabbit is the one persistent connection we have to our
clients. When the rabbit connection disconnects or reconnects, Rabbit
is the only bit of software with that information.

Without having Rabbit interpret that information (let me do the
interpreting) it would be great to just know the information.

Benjamin

On Tue, Mar 15, 2011 at 12:02 PM, Matthias Radestock
<matthias at rabbitmq.com> wrote:
> On 15/03/11 04:31, Deepak Vijayvergiy wrote:
>>
>> Hi Miguel,
>> Even I have the same scenario, and I have my clients
>> announcing(publishing) their connect and disconnect at the time of
>> log-in and log-off resp. I have a deamon process running which is a pure
>> consumer listening on 'register.*'.
>> Would be interested to know if some better way exists.
>
> 'presence' is a highly application dependent concept. Support for it in the
> messaging system itself could only accommodate a very restricted set of use
> cases. So it's best handled by applications.
>
> One fairly generic and flexible way is to get clients to publish a presence
> message every so often to some dedicated exchange. That message can contain
> all kinds of application specific information, e.g. to identify the user,
> what their status is, etc. An app can then consume these messages, update
> some db with status information, send status change messages to clients
> interested and authorised to see them (e.g. 'friends'). The app can also
> detect the absence of the messages and mark the user as absent.
>
> In this scheme
>
> - the notion of presence is not tied to the lifetime of connections, or
> queues, or bindings
>
> - the notion of users (or, more generally, 'the things of which we want to
> know the presence') is not tied to that of AMQP users
>
> - presence can be more than just a flag, i.e. all kinds of complex status
> information can be transmitted
>
>
> Regards,
>
> Matthias.
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>



-- 
ben renaud
versly.com
br at versly.com


More information about the rabbitmq-discuss mailing list