After a stream is being processed (applying filter and etc), can each of the remaining items in the processed stream trigger events directly instead of being written to a sink?
I have a bunch of devices keep reporting status to the hazelcast jet stream server. The server performs some filtering on the stream and only keeps devices that are really in bad shape. I want these devices directly trigger some maintenance events instead of being written to a sink (e.g. IMAP). Currently, what I am doing is to sink the stream to a IMAP and register listeners on the map. However, I am not sure if this is the best practice for my use case. I mainly have two concerns:
- I don't necessarily need to store those devices. All I need is to tell some other service the device needs to be maintained.
- Doc says heavy logic shouldn't be put in the listener. What should I do if the task triggered by the event is comprehensive?