Package org.eso.ias.kafkautils
Class KafkaHelper
java.lang.Object
org.eso.ias.kafkautils.KafkaHelper
A helper class providing useful methods and constants for Kafka
- Author:
- acaproni
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The name of the property to get the list of kafka serversstatic final String
The name of the kafka topic for commandsstatic final String
The name of the property to get the name of the consumer groupstatic final String
Default list of serversstatic final String
The kafka group to which this consumer belongsstatic final String
The name of the kafka topic where tools publish the heartbeatstatic final String
The name of the kafka topic where converters and DASUs push the IASIOsstatic final String
The topic used by plugins to send monitor point values and alarms to the converterstatic final String
The name of the kafka topic for replies -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the value of a property from the system propertiesgetValue
(Properties userProps, String propName, String defaultValue) Get the value of a property from the passed properties or, if not found from the System properties.
-
Field Details
-
DEFAULT_BOOTSTRAP_BROKERS
Default list of servers- See Also:
-
BROKERS_PROPNAME
The name of the property to get the list of kafka servers- See Also:
-
DEFAULT_CONSUMER_GROUP
The kafka group to which this consumer belongs- See Also:
-
CONSUMER_GROUP_PROPNAME
The name of the property to get the name of the consumer group- See Also:
-
PLUGINS_TOPIC_NAME
The topic used by plugins to send monitor point values and alarms to the converter- See Also:
-
IASIOs_TOPIC_NAME
The name of the kafka topic where converters and DASUs push the IASIOs- See Also:
-
HEARTBEAT_TOPIC_NAME
The name of the kafka topic where tools publish the heartbeat- See Also:
-
CMD_TOPIC_NAME
The name of the kafka topic for commands- See Also:
-
REPLY_TOPIC_NAME
The name of the kafka topic for replies- See Also:
-
-
Constructor Details
-
KafkaHelper
public KafkaHelper()
-
-
Method Details
-
getValue
Get the value of a property from the system properties- Parameters:
propName
- the name of the property whose value must be get from the system propertiesdefaultValue
- the default value if the property is not defined- Returns:
- the value of the property
-
getValue
Get the value of a property from the passed properties or, if not found from the System properties. If the value is not found in both properties sets then the default is returned.- Parameters:
userProps
- the user defined propertiespropName
- the name of the property to retrievedefaultValue
- the default value if the property is not found- Returns:
- the value of the property
-