Skip to content

Defer using SQL Native TimeoutManager doesn't work in v7.2.0 #98

@Denifia

Description

@Denifia

I have a use case where two systems are using rebus as two-way clients with sql server as the transport, each with their own queue name. System1 defers messages to System2 and in v7.1.7 that works fine but now that I've finally upgraded to v7.2.0, that functionality seems to be broken.

In System1, when a message is deferred via IBus.Defer or IBus.DeferLocal and the optional header rbs2-defer-recipient is set to "System2", a Rebus.Exceptions.MessageCouldNotBeDispatchedToAnyHandlersException is thrown when the message is dequeued from the "System1" queue and processed. To me, that sounds like it didn't attempt to deliver the message to System2 at all.

I've looked through the code and can't spot the exact issue but have been able to recreate my scenario with unit tests. Note that the ItWorks_SetDestinationHeaderFromTheOutside_WithTwoWaySender_AndSqlServerTimeoutManager test works if you set routing queue to "receiver" but that's not applicable for my situation.

I'd like to know if this is expected behaviour, if I've misconfigured something, or if it's a bug. If it's a bug I'm happy to help find and test a fix.

One additional finding I made is that in the existing tests, the automatic defer recipient pipeline step is never hit as the header is already set by something else.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions