New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReplyToAddress header check causes an unexpected exception when bridging audit and error queues #122
Comments
@mauroservienti Is your suggested workaround covered by this documentation? |
No, it's not. The documentation is generic about bridging ServiceControl queues, it makes no mentions of what could happen when not all queues are mapped and how to workaround that. Which could be an improvement on its own. |
#160 will fix the audit queue but errors is more tricky I believe since if we don't transform the address SC would not be able to retry the failure since the endpoint might be on a different transport than SC. For that to work, I think we would have to make SC aware of the message being bridged and either be able to send it to all the transports or somehow relay the retry via the bridge. |
The |
Good point, the reply to address should be left untouched but the failed queue needs to be transformed 👍 This should be an easy fix similar to #160 |
Fixed in #172. Will be released in 1.0. |
Let’s imagine the following, intentionally, simplistic scenario:
Left side (ServiceControl):
Right side:
Bridge:
A sends a message to B. B has auditing enabled, processes the message, and dispatches the audited message to the audit queue. The bridge picks up the message from the audit queue and blows up with the following exception:
Which is caused by the shoveling mechanism that checks for the
ReplyToAddress
header. In the above scenario, the processed message has that header set to “A”: https://github.com/Particular/NServiceBus.Transport.Bridge/blob/7a81f83649cac2f1b89253ea4c344a1c959df86d/src/NServiceBus.Transport.Bridge/MessageShovel.cs#L53-L66TranslateToTargetAddress
checks for mapped endpoints, and cannot find Ahttps://github.com/Particular/NServiceBus.Transport.Bridge/blob/7a81f83649cac2f1b89253ea4c344a1c959df86d/src/NServiceBus.Transport.Bridge/EndpointRegistry.cs#L56-L64
The above makes sense for “regular” messages, but, as far as I have understood, not for audited or failed messages. No one will reply to an audit message or a failed one. I’d even argue that for audited or failed messages that header doesn’t need to be translated, or at least the mapping check should be skipped.
A workaround would be to define all right-side endpoints even those that don’t need to send messages through the bridge, which is a cumbersome solution.
The text was updated successfully, but these errors were encountered: