You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On which operating system(s) are you experiencing the issue?
Linux
Using which broker(s) did you encounter the issue?
RabbitMQ
What are the steps required to reproduce the issue?
Setup an application that publishes messages to a RabbitMq topic and a consumer that reads messages from that topic.
In v8.2.0 it works fine but starting v8.2.1, the consumer is no longer picking up messages (the publish seems to work fine).
I created a github repo with a .NET application that reproduces this issue.
The app is configured with v8.2.0 which works without problems.
If you update the MassTransit packages to v8.2.1 or 8.2.2, then the consumer no longer works.
What is the expected behavior?
I'd expect the MassTransit package to have the same behavior as v8.2.0 in the later patch releases, since it shouldn't introduce breaking changes in a patch version.
What actually happened?
Bumping our MassTransit packages to the latest patch version broke our consumers
Related log output, including any exceptions
No response
Link to repository that demonstrates/reproduces the issue
It isn't working now because the RoutingKeyFormatter is executing before your scoped filter. The routing key formatter runs first because it is specified at a lower type level than the message type for the scoped filter, at least that's my suspicion. Previously it was a race condition based upon recursively resolving a message's parent types.
Why you wouldn't just do the work in the routing key formatter instead:
configurator.Send<TEvent>(x =>{ x.UseRoutingKeyFormatter(context =>{vardurableEventName=(context.Message.GetType().GetProperty(DurableEventNameProperty)?.GetValue(context.Message))??thrownew InvalidOperationException($"Message does not have the required property: {DurableEventNameProperty}"+$" Make sure to implement {nameof(IDurableEventName)}");return(string)durableEventName;});});
phatboyg
changed the title
RabbitMQ consumer no longer working since v8.2.1
Scoped Filters execute after topology conventions are applied when publishing/sending
May 3, 2024
I see, moving the work in the routing key formatter indeed fixes it in my repro case. I'll make the needed changes into our applications next week and will run regression tests, will keep you informed.
Contact Details
info@nebula-tech.io
Version
8.x
On which operating system(s) are you experiencing the issue?
Linux
Using which broker(s) did you encounter the issue?
RabbitMQ
What are the steps required to reproduce the issue?
Setup an application that publishes messages to a RabbitMq topic and a consumer that reads messages from that topic. In v8.2.0 it works fine but starting v8.2.1, the consumer is no longer picking up messages (the publish seems to work fine). I created a github repo with a .NET application that reproduces this issue. The app is configured with v8.2.0 which works without problems. If you update the MassTransit packages to v8.2.1 or 8.2.2, then the consumer no longer works.
What is the expected behavior?
I'd expect the MassTransit package to have the same behavior as v8.2.0 in the later patch releases, since it shouldn't introduce breaking changes in a patch version.
What actually happened?
Bumping our MassTransit packages to the latest patch version broke our consumers
Related log output, including any exceptions
No response
Link to repository that demonstrates/reproduces the issue
https://github.com/flannoo/masstransit-consumer-issue
The text was updated successfully, but these errors were encountered: