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

Document Examples & Patterns #96

Open
ric-evans opened this issue May 4, 2023 · 0 comments
Open

Document Examples & Patterns #96

ric-evans opened this issue May 4, 2023 · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@ric-evans
Copy link
Contributor

Let's document a list of "known working patterns" and "known problematic patterns".

One problematic problem is separating the QueueSubResource's context manager and iterator in a loop. For example:

while True:
	async with from_clients_queue.open_sub() as sub:
		... other stuff that takes a while ...
		async for msg in sub:
			process(msg)

On RabbitMQ this will raise a ConnectionResetError: [Errno 104] Connection reset by peer error. It could be resolved by increasing the heartbeat timeout (which is controlled by ack_timeout, but this is a complex problem--best to avoid)

@ric-evans ric-evans added the documentation Improvements or additions to documentation label May 4, 2023
@ric-evans ric-evans self-assigned this May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant