[ 
https://issues.apache.org/jira/browse/KAFKA-6213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16254831#comment-16254831
 ] 

Matthias J. Sax commented on KAFKA-6213:
----------------------------------------

The behavior you describe sound as expected. However, after the first {{close}} 
call and before a call to {{process}}, there should be a call to {{init}} 
again. Can you confirm that this {{init}} call is there? Or is it missing?

> Stream processor receives messages after close() is invoked
> -----------------------------------------------------------
>
>                 Key: KAFKA-6213
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6213
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.11.0.1
>            Reporter: Bart De Vylder
>
> I think it is not expected or desirable that a processor receives messages 
> (through its {{process}} method) after {{close}} has been invoked.
> Scenario that triggered the behavior: 
> We have a topic with 2 partitions and a simple streaming app:
> {code}
>     builder.stream(topic)
>            .process(() -> new SomeProcessor());
> {code}
> Then we create one instance of this application, this triggers the 
> construction of 2 SomeProcessor instances in that application. Next we start 
> a second application, which triggers the rebalance of the partitions. It was 
> observed that both existing SomeProcessor instances in the first application 
> received a {{close}} call. However, after the {{close}} method was invoked, 
> no new SomeProcessor was constructed and the {{process}} method of one of the 
> existing (and closed) ones is still being invoked.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to