Skip to content
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

An endpoint is "force detached" by the broker when sending messages #994

Open
adamralph opened this issue May 28, 2024 · 1 comment
Open

Comments

@adamralph
Copy link
Member

adamralph commented May 28, 2024

Describe the bug

Description

When sending/publishing messages (either using transactional session or inside a message handler), the default behaviour is to batch them and send them after the method calling the send/publish method has exited. (This behavior can be changed to dispatch immediately, but then transactionality is lost.)

Expected behavior

The messages are sent.

Actual behavior

The messages are not sent, and an exception is logged.

Versions

3.0.0 onwards. Introduced in #644

Steps to reproduce

In a message handler, send some messages, with the total size of all messages greater than the max allowed message size of the queue.

Relevant log output

> System.InvalidOperationException: The link 'G6:14740510:amqps://**namespace removed**.servicebus.windows.net/-dd910ad4;0:7:8' is force detached by the broker because publisher(link3082) received a batch message with no data in it. Detach origin: Publisher.
For troubleshooting information, see https://aka.ms/azsdk/net/servicebus/exceptions/troubleshoot.

Additional Information

Workarounds

None identified so far.

Note that switching to immediate dispatch (actually sending the message when the send/publish method is called) is not a workaround, because that is very different behaviour which loses any guarantees around message sending/publishing transactionality.

Possible solutions

Additional information

This also manifests in ServiceControl when it attempts to forward audit messages. See Particular/ServiceControl#4185.

Our resolution to this bug may well depend on changes to the Azure SDK client, see Azure/azure-sdk-for-net#44261

@adamralph
Copy link
Member Author

We've prioritized this near the top of our list and will work on it as soon as we can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant