public class KafkaTopicController extends Object implements IController
Constructor and Description |
---|
KafkaTopicController(String bootstrapServers,
String instanceId,
String clusterName,
String commandTopic,
String assignementTopic,
String controlTopic,
org.thales.punch.platform.api.pojo.JavaStoreSecurity securityStores)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
startLeader(ILeader leader,
long tickInterval)
The leader is started in a dedicated thread but every time it vanishes,
it is restarted from a fresh new state.
|
void |
startWorker(IWorker worker,
long tickInterval)
A worker is started only once and is not supposed to vanish ever.
|
public KafkaTopicController(String bootstrapServers, String instanceId, String clusterName, String commandTopic, String assignementTopic, String controlTopic, org.thales.punch.platform.api.pojo.JavaStoreSecurity securityStores)
Note that the underlying Kafka producer is designed to succeed in writing to Kafka even though not all Kafka servers are up and running.
The idea is to make that consumer able to keep working in non-nominal situations.
bootstrapServers
- the kafka bootstrap server addressinstanceId
- this daemon instance identifierclusterName
- the shiva cluster namecontrolTopic
- the kafka topic used for control messagescommandTopic
- the kafka topic used to transport configuration filesassignementTopic
- the kafka topic used to hold the assignmentspublic void startLeader(ILeader leader, long tickInterval)
startLeader
in interface IController
leader
- the leadertickInterval
- the refresh intervalpublic void startWorker(IWorker worker, long tickInterval)
startWorker
in interface IController
worker
- the worker to starttickInterval
- the refresh intervalCopyright © 2022. All rights reserved.