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
I have problem when using NServiceBus.Router with RabbitMq Transport as one interface. In my production environment we had some issues with network connection, so one of our acceptance test i stop rabbiMq container and start it after some random time. When we done that we get very strange situation that some message was get from queue but never acked or processed. To avoid this problem we create mechanism of stopping router when rabbitMq is not available and start it/create when rabbit will be available again. But we get situation that all message except some that hangs. Also there was additional connection on rabbitMq from app. After some digging I found that problem is when stopping receiver in NServiceBus.Raw. There is only stopping on MessagePump but for RabbitMq it's work only when connection is in not closed state, when we have broken connection message pump is stopped, so message handling is detached from consumer but object is not disposing, reconnect task is still working and when connection is reestablished consumer download message but never processed it. Another drawback is that additional connection is shown i rabbitMq. I fixed it bu adding disposing IDisposable object when stopping receiver (I didn't any reference or reuse of object so it should be safe). That makes rabbitMq message pump disposing and disposing connection, circiuteBreaker mechanism. I not sure what situation is with sending component. I will create pull request with my fix, and If this solution is wrong please discard it.
The text was updated successfully, but these errors were encountered:
szymo0
pushed a commit
to szymo0/NServiceBus.Raw
that referenced
this issue
Mar 31, 2020
Hi,
I have problem when using NServiceBus.Router with RabbitMq Transport as one interface. In my production environment we had some issues with network connection, so one of our acceptance test i stop rabbiMq container and start it after some random time. When we done that we get very strange situation that some message was get from queue but never acked or processed. To avoid this problem we create mechanism of stopping router when rabbitMq is not available and start it/create when rabbit will be available again. But we get situation that all message except some that hangs. Also there was additional connection on rabbitMq from app. After some digging I found that problem is when stopping receiver in NServiceBus.Raw. There is only stopping on MessagePump but for RabbitMq it's work only when connection is in not closed state, when we have broken connection message pump is stopped, so message handling is detached from consumer but object is not disposing, reconnect task is still working and when connection is reestablished consumer download message but never processed it. Another drawback is that additional connection is shown i rabbitMq. I fixed it bu adding disposing IDisposable object when stopping receiver (I didn't any reference or reuse of object so it should be safe). That makes rabbitMq message pump disposing and disposing connection, circiuteBreaker mechanism. I not sure what situation is with sending component. I will create pull request with my fix, and If this solution is wrong please discard it.
The text was updated successfully, but these errors were encountered: