Events are routed to endpoints that do not subscribe them
Affected are endpoints which are both publishers and subscribers and a single assembly/namespace contains event types both subscribed and published. Let's say MyEndpoint publishes Events.SomeEvent and subscribes to Events.OtherEvent published by OtherEndpoint. Then if mappings are defined on assembly or namespace level like
<add Assembly="Events" Endpoint="OtherEndpoint" />
That means that for all events from Events assembly there is a static route to OtherEndpoint. That means that SomeEvent will be routed to OtherEdnpoint even though if that endpoint does not subscribe to it.
This bug seems to be critical because potentially multiple messages can be sent to endpoints that do not expect them (causing error messages in the logs). Even worse, if an endpoint does have a handler for a given misrouted message, an incorrect business logic might be triggered as a result.
Add the static route based on MessageEndpointMappings only for non-events.
@timbussmann I've raised the routing issue. I thing it needs to be triaged but I don't know the process. I'll try to do it tomorrow.
@Particular/platform-dev-squad what are the next steps on a bug? I've went through https://github.com/Particular/PlatformDevelopment/blob/master/Guidelines/triage.md but I am not sure at which point a TF should form and how to make it as considered from promotion. My opinion is that it has to be fixed before V6 launch.
I've put the v6 launch label on, so not needed for a RC?
I'd say it is needed for RC. If you are affected (and e.g. our Video Store example is affected), you'll get error messages in places you don't expect them. I'd say considerable number of our customers have all their messages grouped in a single assembly/namespace which combined with a per-namespace or per-assembly mapping results in additional messages being sent to non-subscribers.
Makes sense, lets make this a prio after all the betas are up
@SzymonPobiega thanks for raising the issue! :+1: /cc @sfarmar @mat-mcloughlin
I agree this should be treated like a critical. So I think it also needs an impact label @andreasohlund ?
Likely solution
Add the static route based on MessageEndpointMappings only for non-events.
I came to the same solution yesterday. Since there doesn't seem to be a way to configure "static subscribers", that should be fine?
closing this since #3744 fixes the issue and is included in the current v6 release branch
Most helpful comment
Makes sense, lets make this a prio after all the betas are up