springframeworkguru / netflux-example Goto Github PK
View Code? Open in Web Editor NEWReactive Programming with Spring Example
Reactive Programming with Spring Example
Hi!
I'm running the example with the init code where the movies get put in the database on M6 and the application closes down before the findAll() and println get executed. I downgraded to M3 and everything works fine.
Leaves a lot of scary looking stacktraces in my log because the mongodb connections are already being shutdown when the findAll() executes.
2017-11-25 17:47:43.888 WARN 83949 --- [ Thread-15] org.mongodb.driver.client : Callback onResult call produced an error
reactor.core.Exceptions$ErrorCallbackNotImplemented: org.springframework.data.mongodb.UncategorizedMongoDbException: Exception receiving message; nested exception is com.mongodb.MongoSocketReadException: Exception receiving message
Caused by: org.springframework.data.mongodb.UncategorizedMongoDbException: Exception receiving message; nested exception is com.mongodb.MongoSocketReadException: Exception receiving message
at org.springframework.data.mongodb.core.MongoExceptionTranslator.translateExceptionIfPossible(MongoExceptionTranslator.java:131) ~[spring-data-mongodb-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.data.mongodb.core.ReactiveMongoTemplate.potentiallyConvertRuntimeException(ReactiveMongoTemplate.java:2197) ~[spring-data-mongodb-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.data.mongodb.core.ReactiveMongoTemplate.lambda$translateException$54(ReactiveMongoTemplate.java:2180) ~[spring-data-mongodb-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at reactor.core.publisher.Flux.lambda$onErrorMap$22(Flux.java:5115) ~[reactor-core-3.1.1.RELEASE.jar:3.1.1.RELEASE]
at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:88) ~[reactor-core-3.1.1.RELEASE.jar:3.1.1.RELEASE]
at com.mongodb.reactivestreams.client.internal.ObservableToPublisher$1.onError(ObservableToPublisher.java:73) ~[mongodb-driver-reactivestreams-1.6.0.jar:na]
at com.mongodb.async.client.AbstractSubscription.onError(AbstractSubscription.java:123) ~[mongodb-driver-async-3.5.0.jar:na]
at com.mongodb.async.client.SingleResultCallbackSubscription$1.onResult(SingleResultCallbackSubscription.java:42) ~[mongodb-driver-async-3.5.0.jar:na]
at com.mongodb.async.client.MongoCollectionImpl$6.onResult(MongoCollectionImpl.java:592) ~[mongodb-driver-async-3.5.0.jar:na]
at com.mongodb.async.client.MongoCollectionImpl$6.onResult(MongoCollectionImpl.java:588) ~[mongodb-driver-async-3.5.0.jar:na]
at com.mongodb.async.client.MongoCollectionImpl$8.onResult(MongoCollectionImpl.java:641) ~[mongodb-driver-async-3.5.0.jar:na]
at com.mongodb.async.client.MongoCollectionImpl$8.onResult(MongoCollectionImpl.java:625) ~[mongodb-driver-async-3.5.0.jar:na]
at com.mongodb.internal.async.ErrorHandlingResultCallback.onResult(ErrorHandlingResultCallback.java:49) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.async.client.MongoClientImpl$2$2.onResult(MongoClientImpl.java:144) [mongodb-driver-async-3.5.0.jar:na]
at com.mongodb.internal.async.ErrorHandlingResultCallback.onResult(ErrorHandlingResultCallback.java:49) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.operation.MixedBulkWriteOperation$2.call(MixedBulkWriteOperation.java:202) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.operation.OperationHelper$8.onResult(OperationHelper.java:472) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.operation.OperationHelper$8.onResult(OperationHelper.java:467) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.DefaultServer$1.onResult(DefaultServer.java:94) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.DefaultServer$1.onResult(DefaultServer.java:87) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.internal.async.ErrorHandlingResultCallback.onResult(ErrorHandlingResultCallback.java:49) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.DefaultConnectionPool$2.onResult(DefaultConnectionPool.java:200) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.DefaultConnectionPool$2.onResult(DefaultConnectionPool.java:192) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.UsageTrackingInternalConnection$1.onResult(UsageTrackingInternalConnection.java:58) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.UsageTrackingInternalConnection$1.onResult(UsageTrackingInternalConnection.java:54) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.InternalStreamConnection$1$1.onResult(InternalStreamConnection.java:138) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.InternalStreamConnection$1$1.onResult(InternalStreamConnection.java:133) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.InternalStreamConnectionInitializer$1.onResult(InternalStreamConnectionInitializer.java:63) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.InternalStreamConnectionInitializer$1.onResult(InternalStreamConnectionInitializer.java:59) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.InternalStreamConnectionInitializer$2.onResult(InternalStreamConnectionInitializer.java:121) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.InternalStreamConnectionInitializer$2.onResult(InternalStreamConnectionInitializer.java:117) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.CommandHelper$1$1.onResult(CommandHelper.java:47) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.CommandHelper$1$1.onResult(CommandHelper.java:43) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.CommandHelper$3.onResult(CommandHelper.java:153) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.CommandHelper$3.onResult(CommandHelper.java:148) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.InternalStreamConnection.failAllQueuedReads(InternalStreamConnection.java:577) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.InternalStreamConnection.access$1200(InternalStreamConnection.java:61) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.InternalStreamConnection$ResponseBuffersCallback.onResult(InternalStreamConnection.java:377) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.InternalStreamConnection$ResponseBuffersCallback.onResult(InternalStreamConnection.java:369) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.InternalStreamConnection$ResponseHeaderCallback.onResult(InternalStreamConnection.java:507) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.InternalStreamConnection$ResponseHeaderCallback.onResult(InternalStreamConnection.java:497) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.internal.async.ErrorHandlingResultCallback.onResult(ErrorHandlingResultCallback.java:49) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.InternalStreamConnection$3.failed(InternalStreamConnection.java:433) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.AsynchronousSocketChannelStream$BasicCompletionHandler.failed(AsynchronousSocketChannelStream.java:234) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.AsynchronousSocketChannelStream$BasicCompletionHandler.failed(AsynchronousSocketChannelStream.java:202) [mongodb-driver-core-3.5.0.jar:na]
at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:128) [na:1.8.0_112]
at sun.nio.ch.Invoker.invokeDirect(Invoker.java:157) [na:1.8.0_112]
at sun.nio.ch.UnixAsynchronousSocketChannelImpl.implRead(UnixAsynchronousSocketChannelImpl.java:553) [na:1.8.0_112]
at sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:276) [na:1.8.0_112]
at sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:297) [na:1.8.0_112]
at com.mongodb.connection.AsynchronousSocketChannelStream.readAsync(AsynchronousSocketChannelStream.java:126) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.InternalStreamConnection.readAsync(InternalStreamConnection.java:424) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.InternalStreamConnection.receiveResponseAsync(InternalStreamConnection.java:413) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.InternalStreamConnection.executeCallbackAndReceiveResponse(InternalStreamConnection.java:365) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.InternalStreamConnection.receiveMessageAsync(InternalStreamConnection.java:349) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.CommandHelper.receiveReplyAsync(CommandHelper.java:147) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.CommandHelper.access$100(CommandHelper.java:30) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.CommandHelper$1.onResult(CommandHelper.java:43) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.CommandHelper$1.onResult(CommandHelper.java:37) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.CommandHelper$2.onResult(CommandHelper.java:111) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.CommandHelper$2.onResult(CommandHelper.java:104) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.internal.async.ErrorHandlingResultCallback.onResult(ErrorHandlingResultCallback.java:49) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.InternalStreamConnection$2.completed(InternalStreamConnection.java:292) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.InternalStreamConnection$2.completed(InternalStreamConnection.java:279) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.AsynchronousSocketChannelStream$1.completed(AsynchronousSocketChannelStream.java:112) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.AsynchronousSocketChannelStream$1.completed(AsynchronousSocketChannelStream.java:106) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.AsynchronousSocketChannelStream$2.completed(AsynchronousSocketChannelStream.java:165) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.AsynchronousSocketChannelStream$2.completed(AsynchronousSocketChannelStream.java:159) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.AsynchronousSocketChannelStream$AsyncWritableByteChannelAdapter$WriteCompletionHandler.completed(AsynchronousSocketChannelStream.java:191) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.AsynchronousSocketChannelStream$AsyncWritableByteChannelAdapter$WriteCompletionHandler.completed(AsynchronousSocketChannelStream.java:182) [mongodb-driver-core-3.5.0.jar:na]
at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126) [na:1.8.0_112]
at sun.nio.ch.Invoker.invokeDirect(Invoker.java:157) [na:1.8.0_112]
at sun.nio.ch.UnixAsynchronousSocketChannelImpl.implWrite(UnixAsynchronousSocketChannelImpl.java:736) [na:1.8.0_112]
at sun.nio.ch.AsynchronousSocketChannelImpl.write(AsynchronousSocketChannelImpl.java:382) [na:1.8.0_112]
at sun.nio.ch.AsynchronousSocketChannelImpl.write(AsynchronousSocketChannelImpl.java:399) [na:1.8.0_112]
at java.nio.channels.AsynchronousSocketChannel.write(AsynchronousSocketChannel.java:577) [na:1.8.0_112]
at com.mongodb.connection.AsynchronousSocketChannelStream$AsyncWritableByteChannelAdapter.write(AsynchronousSocketChannelStream.java:179) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.AsynchronousSocketChannelStream.pipeOneBuffer(AsynchronousSocketChannelStream.java:159) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.AsynchronousSocketChannelStream.writeAsync(AsynchronousSocketChannelStream.java:106) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.InternalStreamConnection.writeAsync(InternalStreamConnection.java:279) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.InternalStreamConnection.sendMessageAsync(InternalStreamConnection.java:274) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.CommandHelper.sendMessageAsync(CommandHelper.java:104) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.CommandHelper.executeCommandAsync(CommandHelper.java:37) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.InternalStreamConnectionInitializer.initializeConnectionDescriptionAsync(InternalStreamConnectionInitializer.java:116) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.InternalStreamConnectionInitializer.initializeAsync(InternalStreamConnectionInitializer.java:53) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.InternalStreamConnection$1.completed(InternalStreamConnection.java:133) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.InternalStreamConnection$1.completed(InternalStreamConnection.java:130) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.AsynchronousSocketChannelStream$OpenCompletionHandler.completed(AsynchronousSocketChannelStream.java:247) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.AsynchronousSocketChannelStream$OpenCompletionHandler.completed(AsynchronousSocketChannelStream.java:239) [mongodb-driver-core-3.5.0.jar:na]
at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126) [na:1.8.0_112]
at sun.nio.ch.UnixAsynchronousSocketChannelImpl.finishConnect(UnixAsynchronousSocketChannelImpl.java:278) [na:1.8.0_112]
at sun.nio.ch.UnixAsynchronousSocketChannelImpl.finish(UnixAsynchronousSocketChannelImpl.java:198) [na:1.8.0_112]
at sun.nio.ch.UnixAsynchronousSocketChannelImpl.onEvent(UnixAsynchronousSocketChannelImpl.java:213) [na:1.8.0_112]
at sun.nio.ch.KQueuePort$EventHandlerTask.run(KQueuePort.java:301) [na:1.8.0_112]
at sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112) [na:1.8.0_112]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_112]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_112]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_112]
Caused by: com.mongodb.MongoSocketReadException: Exception receiving message
at com.mongodb.connection.InternalStreamConnection.translateReadException(InternalStreamConnection.java:463) [mongodb-driver-core-3.5.0.jar:na]
at com.mongodb.connection.InternalStreamConnection.access$1800(InternalStreamConnection.java:61) [mongodb-driver-core-3.5.0.jar:na]
... 56 common frames omitted
Caused by: java.io.IOException: Connection reset by peer
at sun.nio.ch.FileDispatcherImpl.read0(Native Method) ~[na:1.8.0_112]
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39) ~[na:1.8.0_112]
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) ~[na:1.8.0_112]
at sun.nio.ch.IOUtil.read(IOUtil.java:197) ~[na:1.8.0_112]
at sun.nio.ch.UnixAsynchronousSocketChannelImpl.implRead(UnixAsynchronousSocketChannelImpl.java:508) [na:1.8.0_112]
... 50 common frames omitted
2017-11-25 17:47:43.889 INFO 83949 --- [ Thread-15] org.mongodb.driver.connection : Closed connection [connectionId{localValue:3}] to localhost:49415 because there was a socket exception raised by this connection.
2017-11-25 17:47:43.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.