Package app.l2nx.gs.adapter.core.kafka
Class KafkaInitializer
java.lang.Object
app.l2nx.gs.adapter.core.kafka.KafkaInitializer
Bootstraps the
nx-gs-kafka singleton from a platform-issued
KafkaConfig. The state listener forwarded to the factory drives the
adapter's ACTIVE ↔ DEGRADED transitions once the platform handshake
has completed.
The JAAS line is hard-coded against
org.apache.kafka.common.security.scram.ScramLoginModule — the only
SASL mechanism the platform issues in the MVP.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
KafkaInitializer
-
-
Method Details
-
init
public app.l2nx.gs.kafka.KafkaState init(app.l2nx.gs.adapter.api.rest.KafkaConfig kafka, String clientId, Consumer<app.l2nx.gs.kafka.KafkaState> stateChangeListener) Build the Kafka client and return the post-build state. ReturnsKafkaState.DISCONNECTEDwhen the broker is unreachable inside the connect timeout — the adapter should reflect this asDEGRADED;nx-gs-kafkareconnects in the background.- Parameters:
kafka- wire payload from the platform handshakeclientId- composed client identifier (nx-gs-adapter-<tenant>-<server>)stateChangeListener- forwarded toNxKafka.onStateChange
-