Hi, Tobias,
Here is a brief introduction to what we are doing:
What we are trying to achieve now (without spilling too much beans on the topic), is to inform our PBX users of relevant call events.
Now - the *relevant* is a key word here - as the parameters for determining which is *relevant* for me a user are dynamic and that decision is made on the backend.
I know I could always have event URIs: blah.blah.blah.{orgnizationID}.{userID}.specific_event and then use that for user based routing; but from a perspective of cleaner and easier maintained
frontend and backend code, I was thinking of "plugable postprocessor" prior to distributing the event; allow me to explain:
API would allow me to register pre-delivery processor to a crossbar, stating URI to pre-process, and a registered rpc method for pre-processing.
For the sake of example:
Event URI: com.service.events.new_conversation
Event pre-processor: com.service.preprocess.new_conversation
Now - whenever
crossbar.io were to dispatch com.service.events.new_conversation to a subscribed client, it would first call the com.service.preprocess.new_conversation on each and every meesage-client combo it would be about to send with two parameters: 1) event contents and 2) subscribed user
Then our pre-processor would either: a) return the same event data or modify it if needed (say - removing certain keys from event data), or b) raise and exception if this event should not be distributed to the specific user.
Perhaps something to think about for
crossbar.io 2.0 ? :)
/Juris