Skip to content

How to correctly close a StreamsApp with a parallel-consumer ? #609

Closed Answered by rkolesnev
bmaggi asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,
Excuse me for delay in looking into this.

I have tried to reproduce and yes - i noticed that if controlLoop dies - the exception is not thrown to main thread until close() is called - as state of controlTaskFutureResult is not checked until then - this is due to the fact that PC runs asynchronously - it is not possible to throw out the exception from background thread to main thread without blocking (or periodic checking etc).

Given that execution is asynchronous - i am not sure of the top of my head what the best approach would be to monitor it - either as you mentioned - create a thread that checks status of the parallel consumer periodically add and expose an listener hook that is …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rkolesnev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants