[英]Listen to changes in multiple collections of mongodb using java and process the respective collection
I have say 100 collections, each with a different json structure . 我说有100个集合,每个集合具有不同的json结构。 I want to listen all these ,say for example if there are changes in 4 collections, then i need to get new additions to these collections, process them parallely with their structure specific code .
我想听所有这些内容,例如,如果4个集合中有更改,那么我需要为这些集合添加新的内容,并以其特定于结构的代码并行处理它们。
Any suggestions? 有什么建议么?
You can use a Tailable Cursor . 您可以使用可尾光标 。 The mechanics are relatively simple, there are numerous oplog tailing examples out there written in Java, here are a few:
机制相对简单,有许多用Java编写的oplog尾部示例,以下是一些示例:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.