Patterns and Topic subscription suggestion

Hi guys,

We use events a lot, they work on the basics of publisher/subscriber pattern and they do their job. We ended up adding an additional service that stores some extra data when a client is subscribing and I think it could be a good addition for a future version of the SDK.

We added patterns to the subscription part of an event. We not only subscribe now to an event, lets say EID_SomeEventName, but we add a pattern, which is a regular expression of some sort 'order.computers.*'.

e.g.

RegisterClient(Guid, EID_SomeEventName, 'order.computers.*');

Because we are storing the subscription EID name per client, we are also storing additional info like a pattern (is optional). This means that when is time to send messages to clients we can pass a value and it will filter out the sessions that match the value using that pattern.

lSessionList := GetSessionListMatching('order.computers.motherboard');

This sessionlist we pass it over to the SessionList of the event writter and the events will be send out only to the matching items.

We made it a bit more complex by allowing adding multiple patterns to listen for an specific EID, like having a service listening to 'EID_Orders' but only if they come from 'orders.computers.*' or 'orders.shoes.*';

So it goes something like

RegisterClient(Guid, EID_SomeEventName, ['orders.computers.*','orders.shoes.*']);

Now topics can be easily built on top of that, for example:

RegisterClient(Guid, EID_SomeEventName, ['delphi','RO','SDK'], subTopic);

Meaning it will register a client which will receive EID_SomeEventName sinks if they have a topic/tag Delphi, RO, SDK. This internally converts to the same implementation use for patterns but skipping the regEx validation and just looking for equality of names.

We think that this should be part of the SDK, it will add a big value to it.

The infrastructure is there and putting the parts together is not complex and will make the Event sink part of RO a bit more up to date with the existing messaging platforms. Adding the resubscription to Event Sinks after a service crash is a step forward, these other ones are a lot more.

Thank you.

Thanks, logged as bugs://81341