We are using the Dapr Mongo State component as a state store and Mongo Atlas as a DB provider. The DB is running in cluster mode and has primary and secondary replicas. Thus Mongo Atlas provides the connection String in SRV format, for example (mongodb+srv://cluster0.fulhd.mongodb.net/myFirstDatabase )
During Dapr initialization of the mongo component, we are getting init timeout after 5 seconds and the component is not loaded. This results in the failure of the Dapr sidecar during initialization.
On further evaluation, we saw the connectionString is formed inside the code with "mongodb://" and does not support "mongodb+srv://" format.
Expected Behavior
We are using the Dapr Mongo State component as a state store and Mongo Atlas as a DB provider. The DB is running in cluster mode and has primary and secondary replicas. Thus Mongo Atlas provides the connection String in SRV format, for example (mongodb+srv://cluster0.fulhd.mongodb.net/myFirstDatabase )
During Dapr initialization of the mongo component, we are getting init timeout after 5 seconds and the component is not loaded. This results in the failure of the Dapr sidecar during initialization. On further evaluation, we saw the connectionString is formed inside the code with "mongodb://" and does not support "mongodb+srv://" format.
https://github.com/dapr/components-contrib/blob/4ee732e0bd5e616b18fcfe15219712a74300b0fb/state/mongodb/mongodb.go#L49
There is also no way to supply a connectionString directly using any of the metadata fields as defined https://docs.dapr.io/reference/components-reference/supported-state-stores/setup-mongodb/.
Actual Behavior
Steps to Reproduce the Problem