Closed FabianTrottmann closed 1 year ago
The bridge is transport agnostic, so needs to work with all supported transports. Unfortunately, this means working with the lowest common denominator. In this specific case, some transports are case sensitive (e.g. RabbitMQ) while others aren't.
So to answer your question: It is unfortunately required for the lookup to be case sensitive.
With that out of the way, we could look at adding a configuration option to be case insensitive. I'll add a feature request to the bridge so that we can look at getting something like that in.
For now, I've added a note to our documentation to let people know that the lookup is case-sensitive. When this issue is addressed, we can remove the note:
The translation of a source address to target address within the bridge by using
NServiceBus.ReplyTo
as a key fails, if e.g hostname in the ReplyTo header field is upper case whereas the BridgeEndpoint has been configured with lowercase hostname letters.I get the following exception:
My Bridge Endpoint Mapping (host-vm1 is lowercase):
Case-sensitive lookup in NServiceBus.Transport.Bridge:
Of course, there is a simple workaround as long as the behavior is consistent for all messages within the same endpoint. I simply configure the specific BridgeEndpoint according to the replyTo Address (upper or lower case of the hostname).
Oddly, some of our MSMQ endpoints send messages with lowercase hostname in ReplyToAdress and some others with uppercase (I don't know why). So we have a mix of lower and upper case BridgeEndpoint configurations.
Question: is it required to make the lookup case-sensitive, or could it be case-insensitive?