Consumer Configuration

AxualConsumerConfig

Namespace: Axual.Kafka.Proxy.Proxies.Axual

An AxualConsumer is configured in the same way a plain Kafka Consumer would be. A collection of key value pairs object which contains the appropriate configurations needs to be defined. The properties that need to be set are the SSL authorization specifics alongside the Axual Specific properties for authenticating and routing to an available Axual Cluster.

In our case instead of using the ConsumerConfig, we use the overloaded AxualConsumerConfig which contains the additional Axual properties.

Usage

var config = new AxualConsumerConfig
{
    // Axual Configuration
    ApplicationId = "io.axual.example.client.avro.consumer.dotnet",
    EndPoint = new UriBuilder("https",
        ServerSettings.ENDPOINT_ADDRESS, ServerSettings.ENDPOINT_PORT).Uri,
    Tenant = ServerSettings.TENANT,
    Environment = ServerSettings.ENVIRONMENT,

    // Standard SSL Configuration
    SecurityProtocol = SecurityProtocol.Ssl,
    SslKeystoreLocation = CONSUMER_KEYSTORE_RESOURCE_PATH,
    SslKeystorePassword = KEYSTORE_PASSWORD,
    EnableSslCertificateVerification = true,
    SslCaLocation = ServerSettings.SSL_CA_PATH,
    Debug = "consumer,cgrp,topic,fetch"
};

The properties used in the code snippet are summarized below:

Configuration Type Description

ApplicationId

string

Identifier used for verifying ConsumerGroup authorization (as it appears on Self Service Portal)

EndPoint

Uri

Url of instance Discovery-API

Tenant

string

Name of the tenant to connect to

Environment

string

Name of the environment to connect to

SecurityProtocol

Confluent.Kafka.SecurityProtocol

Protocol used to communicate with brokers

SslKeystoreLocation

string

Path to client’s keystore (PKCS#12) used for authentication

SslKeystorePassword

string

Password to client’s keystore (PKCS#12) used for authentication

EnableSslCertificateVerification

bool

Enable OpenSSL’s builtin broker (server) certificate verification. This verification can be extended by the application by implementing a certificate_verify_cb

SslCaLocation

string

File or directory path to CA certificate(s) for verifying the broker’s key

Debug

string

A comma-separated list of debug contexts to enable. Consumer: consumer,cgrp,topic,fetch