-
Notifications
You must be signed in to change notification settings - Fork 11
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
Uncaught ConsumerStoppedError exceptions on closed streams #234
Labels
bug
Something isn't working
Comments
marcosschroh
added a commit
to marcosschroh/kstreams
that referenced
this issue
Nov 15, 2024
…s stopped. Related to kpn#234
marcosschroh
added a commit
to marcosschroh/kstreams
that referenced
this issue
Nov 15, 2024
…s stopped. Related to kpn#234
closed by #238 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Streams running with the UDF approach are not silently shutting down when the consumers are stopped. The ConsumerStoppedError raised is never caught. In our application this is causing sentry errors while this is a graceful shutdown.
To Reproduce
Run a UDF consumer stream and shut down the application.
Expected behavior
I would expect stream.start() to suppress the ConsumerStoppedError.
Logs
Task exception was never retrieved
future: <Task finished name='Task-10' coro=<Stream.start() done, defined at /app/.venv/lib/python3.11/site-packages/kstreams/streams.py:334> exception=ConsumerStoppedError()>
ConsumerStoppedError: null
File "kstreams/streams.py", line 361, in start
await self.func_wrapper_with_typing()
File "kstreams/streams.py", line 367, in func_wrapper_with_typing
cr = await self.getone()
File "kstreams/streams.py", line 277, in getone
consumer_record: ConsumerRecord = await self.consumer.getone() # type: ignore
File "aiokafka/consumer/consumer.py", line 1160, in getone
msg = await self._fetcher.next_record(partitions)
File "aiokafka/consumer/fetcher.py", line 1086, in next_record
raise ConsumerStoppedError()
The text was updated successfully, but these errors were encountered: