Axual Client Reference


Package: io.axual.common.config

This class represents the configuration that must be passed to AxualClient to build an object that communicates with Kafka brokers and Discovery API.


	.setEndpoint("...") (1)
	.setApplicationId("...") (2)
	.setApplicationVersion("...") (3)
	.setTenant("...") (4)
	.setEnvironment("...") (5)
	.setSslConfig(...) (6)
1 URL of Discovery API. (Provided during the on-boarding phase)
2 Unique ID of the Application, as specified in the Self Service.
3 Version of your Application. This information will be used for tracing the calls. (Optional)
4 Short name of the Tenant, as specified in the Self Service.
5 Short name of the Environment, as specified in the Self Service.
6 Configuration for SSL connection. Refer below.


Package: io.axual.common.config

Build this config to setup the keystore and truststore properties required for SSL communication with Kafka brokers.

	.setKeyPassword(new PasswordConfig("..."))
	.setKeystorePassword(new PasswordConfig("..."))
	.setTruststorePassword(new PasswordConfig("..."))


Package: io.axual.common.config

Wrapper for specifying passwords for different properties.


Package: io.axual.client

This class is initialized with ClientConfig object to setup the communication with Kafka Cluster. An object of this class can be used to build producers and consumers.


ClientConfig clientConfig = ...

AxualClient client = new AxualClient(clientConfig);

Producer<K, V> producer = client.buildProducer(...);

Consumer<K, V> consumer = client.buildConsumer(...);

A single instance of AxualClient can be used to build multiple producer and consumer objects.

AxualClient is not thread-safe.