You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Chris Berry <ch...@gmail.com> on 2018/03/27 18:45:01 UTC
LifeCycle STOPPED question
Hi,
I have a question about Ignite LifeCycle and have not been able to find the
info by googling.
Under what conditions does a Node get into the STOPPED state??
And is that final??
In other words, once a Node is STOPPED can it somehow become STARTED again
in the natural flow of things??
I ask because I have a KafkaListener that must stop listening when a Node is
STOPPED.
That KafkaListener is listening to Ignite LifeCycle Events.
And I want to simply close that Kafka Consumer when it gets a BEFORE_STOPPED
Event.
But I do not want to do that if being STOPPED is something that a Node
recovers from.
Similarly, I want to create a NodeKiller that listens to STOPPED Events.
And shuts down the Node gracefully when this happens.
Could someone in the know please enlighten me??
Thanks,
-- Chris
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: LifeCycle STOPPED question
Posted by Chris Berry <ch...@gmail.com>.
Thank you!!
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: LifeCycle STOPPED question
Posted by Roman Guseinov <ro...@gromtech.ru>.
Hi Chris,
STOPPED state is final. A node will not become STARTED again after that.
Why do you need to create a NodeKiller? Node's process will be closed
automatically when Life Cycle Beans handled BEFORE_NODE_STOP,
AFTER_NODE_STOP events.
The difference between these events is that BEFORE_NODE_STOP will be
received before Ignite destroyed own components (workers, spi, thread
pools).
This way, it sounds reasonable to close the Kafka Consumer in the process of
handling BEFORE_NODE_STOP.
Best Regards,
Roman
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/