B4J Question JMongo - Reactive Streams / Subscription Model / RealTime Change Notifications

Mashiane

Expert
Licensed User
Longtime User
Hi

How can one trap SSE on jmongo to detect changes when CRUD functions are performed? I found this from chatgpt

B4X:
MongoClients.create()
  .getDatabase("test")
  .getCollection("myCollection")
  .watch()
  .subscribe(change -> System.out.println("Change detected: " + change));


Apparently one can do such with something called re-active streams


Is there something like this with jMongo that we can use or an alternative methodology to trap realtime CRUD events?

Thanks.
 
Top