zephyr-im / zephyr

An institutional/enterprise-scale distributed real-time messaging and notification system
34 stars 11 forks source link

Provide a way to flush all of a user's subscriptions #103

Closed andersk-auto closed 10 years ago

andersk-auto commented 10 years ago

Provide a command and protocol mechanism to flush all subscriptions belonging to a given user, regardless of destination host/port. This operation should be available to each user for himself, and to opstaff for any user.

andersk-auto commented 10 years ago

Imported from trac issue 103. Created by jhutz@CS.CMU.EDU on 2013-02-18T16:02:01, last modified: 2013-02-27T00:33:31

andersk-auto commented 10 years ago

Trac comment by jhutz@CS.CMU.EDU on 2013-02-23 03:32:25:

A request to flush all subs for a principal will take the form of a notice with class "ZEPHYR_CTL", instance "CLIENT", and opcode "FLUSHSUBS"; this is analogous to other subscription-management control messages. The principal whose subscriptions are to be flushed is named in the message body (which must be NUL-terminated, as usual); if the body is empty, the sender's subscriptions are flushed.

Ordinarily, you can only flush your own subs; however, members of opstaff.acl will be able to flush subs for any user. In either case, the request must be authentic.

Note that this operation is analogous to HM_FLUSH, except that it applies to all clients belonging to a given principal instead of to all clients on a given host. Among other things, this means that not only are the clients' subscriptions discarded, any notices awaiting retransmission to that client will also be dropped. However, unlike HM_FLUSH, CLIENT_FLUSHSUBS will not touch locations.