MongoDB Output plugin 3.1.7 error

Hi,

I am not able to connect to MongoDB Compass Version 7.0.3 with below error.Using plugin version 3.1.7.

[WARN ][logstash.outputs.mongodb ][main] MONGODB | Failed to handshake with localhost:27017: ArgumentError: wrong number of arguments (given 2, expected 1)
[WARN ][logstash.outputs.mongodb ][main] MONGODB | Error checking localhost:27017: ArgumentError: wrong number of arguments (given 2, expected 1)

My configuration is
mongodb {
uri => "mongodb://my-mongodb-host:27017/my-database"
database => "my-database"
collection => "mycollection"
}

I would suggest trying 3.1.6 or even 3.1.5 to see if either of them work.

The exception is generated down inside the ruby MongoDB client.