Hi,
I am using topology to addProcessor MessageProcessingHandler class which implements Processor. It is defined as Prototype bean. But, prototype beans need to be destroyed by the client. In this case, it is topology who is invoking MessageProcessingHandler bean. I have also added PunctuatorProcessor class. So, how I will destroy the bean ?
I can use
@PreDestroy
public void destroy() {
log.info(“MessageProcessingHandler :: destroy Destroying MessageProcessingHandler bean”);
}
But, I am maintaining state using StateStore(RockDB) . Punctuator processor runs to execute MessageProcessingHandler. So, will it cause issue if I destroy the bean. Is there any interference ?