Using EventStore for Pub/Sub

Would it be a valid use of ES to use it for Pub/Sub? E.g. using the Client API to subscribe to a certain stream (which would normally be called “topic” in message bus parlance) and then calling actions off of that?

Would it make sense to key streams off of the current date or something, to allow old messages to be deleted (e.g. “stream-20120101” would be deleted on January 8th)?

Yes that can be done quite easily (will be fully in client API with
backtracking as well soon though its basically what atompub does

There are 2 pieces of stream create metadata that will be in master shortly

$maxAge and $maxCount which will scavenge old messages.

Using dates in keys and deleting is another way of doing it.



Excellent! Although I’m assuming the client API will be somewhat more performant in that new events get pushed to it vs. needing to poll for the atompub?

subscribe <stream>

EventStore.Subscribe be implemented in the next drop? In master currently it isn’t totally complete :slight_smile:

look at dev branch