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

Allow setting connection read timeouts in addition to idle timeouts #163

Open
hilaryhacksel opened this issue Jun 27, 2022 · 5 comments
Open

Comments

@hilaryhacksel
Copy link

hilaryhacksel commented Jun 27, 2022

Currently, a read deadline on a connection is set using the idle timeout value, which is continually updated as more frames are received. However, there is no way to generate an error when the entire body hasn't been read over some specified amount of time.

@hilaryhacksel
Copy link
Author

@jhendrixMSFT have you had chance to take a look at this request, and would this be something you or your team would consider taking on?

@jhendrixMSFT
Copy link
Member

Hello and sorry for the long delay.

I will be looking at this as part of the reliability improvements we're making. If there's anything specific to your scenario or details you can share that triggered the creation of this bug that would be most appreciated.

@hilaryhacksel
Copy link
Author

hilaryhacksel commented Jan 30, 2023

Hi @jhendrixMSFT! It's exciting to hear about the new reliability improvements 🙂

I created this issue because I wanted to reduce the amount of time it would take for a read timeout error to occur. In our environment, publishing messages and reading their associated responses should be very fast, so we want to propagate the i/o read error early.

Setting the idle timeout value lower had similar results, however, this solution seemed undesirable since it still would allow for very long reads in some scenarios (ie when responses are slowly trickling in) and would be unnecessarily modifying your package's keep-alive behaviour.

If you'd like any more details, please don't hesitate to reach out!

@jhendrixMSFT
Copy link
Member

To make sure I understand. When calling Receiver.Receive(), you'd like to be able to set a read deadline for reading the entire message? Assuming this is the case, is the desired read deadline uniform across calls to Receive(), or is there a need to specify a read deadline per API call?

@hilaryhacksel
Copy link
Author

hilaryhacksel commented Mar 2, 2023

We don't actually care too much about the length of time it takes to read messages from Receiver.Receive(). We care more about the duration to Publisher.Send() and we have to wait synchronously for those messages to succeed (which we know should be very fast). What I was hoping for with this issue is a way to specify an earlier read deadline on our publishing connection (ie specifying a shorter duration to read the response from the broker).

The read deadline of the brokers response would be uniform across all Publisher.Send() calls.

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

No branches or pull requests

2 participants