MongoDB changestream引发MongoCommandException:命令失败,错误10334(Location10334):'BSONObj大小:17859998(0x110859E)无效

时间:2018-11-29 23:01:31

标签: mongodb changestream mongodb-3.6

我正在收听MongoDB 3.6 changestream,这是我遇到的例外。

com.mongodb.MongoCommandException:命令失败,错误10334(Location10334):'BSONObj大小:17859998(0x110859E)无效。大小必须介于0到16793600(16MB)之间。第一个元素:fullDocument:{_id:“ d90c5050-f463-421c-a3a5-235f27ba8e2a”,.................... ............} 在com.mongodb.internal.connection.ProtocolHelper.getCommandFailureException(ProtocolHelper.java:179)         在com.mongodb.internal.connection.InternalStreamConnection.receiveCommandMessageResponse(InternalStreamConnection.java:293)         在com.mongodb.internal.connection.InternalStreamConnection.sendAndReceive(InternalStreamConnection.java:255)         在com.mongodb.internal.connection.UsageTrackingInternalConnection.sendAndReceive(UsageTrackingInternalConnection.java:99)         在com.mongodb.internal.connection.DefaultConnectionPool $ PooledConnection.sendAndReceive(DefaultConnectionPool.java:444)         在com.mongodb.internal.connection.CommandProtocolImpl.execute(CommandProtocolImpl.java:72)         在com.mongodb.internal.connection.DefaultServer $ DefaultServerProtocolExecutor.execute(DefaultServer.java:200)         在com.mongodb.internal.connection.DefaultServerConnection.executeProtocol(DefaultServerConnection.java:269)         在com.mongodb.internal.connection.DefaultServerConnection.command(DefaultServerConnection.java:131)         在com.mongodb.internal.connection.DefaultServerConnection.command(DefaultServerConnection.java:123)         在com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:242)         在com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:233)         在com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:136)         在com.mongodb.operation.AggregateOperationImpl $ 1.call(AggregateOperationImpl.java:193)         在com.mongodb.operation.AggregateOperationImpl $ 1.call(AggregateOperationImpl.java:189)         在com.mongodb.operation.OperationHelper.withConnectionSource(OperationHelper.java:457)         在com.mongodb.operation.OperationHelper.withConnection(OperationHelper.java:401)         在com.mongodb.operation.AggregateOperationImpl.execute(AggregateOperationImpl.java:189)         在com.mongodb.operation.ChangeStreamOperation.execute(ChangeStreamOperation.java:264)         在com.mongodb.operation.ChangeStreamOperation.execute(ChangeStreamOperation.java:55)         在com.mongodb.client.internal.MongoClientDelegate $ DelegateOperationExecutor.execute(MongoClientDelegate.java:179)         在com.mongodb.client.internal.MongoIterableImpl.execute(MongoIterableImpl.java:132)         在com.mongodb.client.internal.MongoIterableImpl.iterator(MongoIterableImpl.java:86)         在com.snaplogic.cascade.MongoDBChangeListener.run(MongoDBChangeListener.java:117)

这是问题。 1-它是源MonogoDB中插入的同一文档,为什么我们在听变更流时现在抱怨呢? 2-假设没有任何方法可以抑制它,如果有异常,是否可以从ChangeStreamIterable跳过文档? 3-有没有一种方法可以在MongoDB Java驱动程序级别上实际解决此问题,至少我可以使用修复程序重新编译源代码。

0 个答案:

没有答案