Mongodb+srv and consul srv records

Hey folks,
we run into a issue with our service and consul setup and are not sure, if we will be able to solve this in our infrastructure.

Situation is, that we have consul running as our service discovery and DNS system.
We register our services including MongoDB in consul and are able to resole the services by the service names to get the working servers and backends behind.

The problem is, that consul resolves services like this:

host -t SRV mongos-instance-appRouter.service.eu1.consul
mongos-instance-appRouter.service.eu1.consul has SRV record 1 1 27017
mongos-instance-appRouter.service.eu1.consul has SRV record 1 1 27017

Everything is right so far, but the mongodb driver forces that when using the “mongodb+srv” protocol, that it allows using the resolved host names only, if the “parent domain” of the service is the very same like the one of the resolved hosts.

In our case, where
resolves to

the parent domains differs:
“service.eu1.consul” vs. “node.eu1.consul” and with this, the mongo driver do not allow to connect …

mongo mongodb+srv://dev:password@mongos-instance-appRouter.service.eu1.consul/?ssl=false
FailedToParse: Hostname is not within the domain service.eu1.consul

MongoDB also stated this in the docu:

(check under the “Important” note there)

Has anybody a Idea or hint, if and how we could make this work?
Thanks in advance …

I notice that MongoDB appear to fail to give any reason for this restriction. I would be inclined to open a bug in their issue tracker asking them to either explain why it needs to exist, or remove it.