Reputation: 4303
I'm resiliency testing a kafka connector and I'd like to kill off a worker while it's running, thus killing the connector instance. The easiest way is probably going to be to force distributed mode to run over more than one node, then just kill the worker process on that node (right?). How can I make Kafka connect spawn workers on more than just the node it's started on? Is this something which is defined in worker config?
Upvotes: 2
Views: 3158
Reputation: 4303
So in the end what I did was:
ps -ef | grep connect
), and saw that it had respawned on the remaining node. In summary of my resiliency testing, Kafka Connect seems to be like playing whack-a-mole; you can kill off tasks or connectors wherever they are, and they will just respawn somewhere else.
Upvotes: 1
Reputation: 32090
Yes, handling failures and automatically restarting workload is exactly what Kafka Connect can do. You run it as a cluster, typically one worker per node. Each worker then runs one or many tasks, and this is managed by Connect. If a worker dies, all the tasks that it was running are restarted on other available workers, in a load balanced manner. Check out the architecture reference for more information.
To define workers as being within a cluster, assign them the same group.id
. See the config docs for more info.
Upvotes: 2