Describe the bug
Setting the property quarkus.mongodb.socket-timeout that translates to MongoClientConfig field Optional<Duration> socketTimeout have no effect whatsoever.
The socket configuration sets only the connection timeout but not the read timeout (this may hangs thread indefinitely).
See:
https://mongodb.github.io/mongo-java-driver/3.12/javadoc/com/mongodb/connection/SocketSettings.Builder.html#readTimeout(int,java.util.concurrent.TimeUnit)
Expected behavior
Being able to set both connection and read timeout and use the configured values to actually configure the Mongo client socket settings.
Actual behavior
Socket timeout value not used, socket configuration partial:
To Reproduce
Steps to reproduce the behavior:
socketTimeoutConfiguration
quarkus.mongodb.socket-timeout
quarkus.mongodb.connect-timeout
Screenshots
Not related
Environment (please complete the following information):
Not related, every platform
Additional context
Tried to lock the socket after connection using a firewall and connection hangs in read wait indefinitely.
/cc @loicmathieu
Thanks for reporting @filippobuletto!
I'll take a look
Blazing fast @geoand ! Hope this fix lands on 1.3.1 馃槃
Yeah, we will definitely add it. The only question is whether we will also rename the property or not (it was never having an effect , so it's debatable if it's a breaking change)
In fact, it's a nice dilemma, I could suggest keeping the name in 1.3.1 by fixing its behavior and deprecating its use, renaming it in 1.4.0?
In a totally selfish way I admit that I would like to have the fix published as soon as possible without waiting for a major release 馃槄
Edit: So far, thanks for incredible support!
Thanks for the input!
The fix will absolutely be in 1.3.1. The name of the property is to be determined 馃檭.