How to connect to Azure Event Hub
Orchestrate uses Kafka to exchange messages between different micro-services and to notify users about transaction events on the connected chains. Orchestrate can integrate with Azure Event Hub as an alternative for Kafka as Azure Event Hub provides compatible Kafka interfaces.
To create an Azure Event Hub resource, refer to the Azure Event Hub documentation.
Configure SASL Connection
To configure Orchestrate with Azure Event Hub, configure the following environment variables:
Environment Variable | Command line option | Description | Value |
---|---|---|---|
KAFKA_TLS_ENABLED | kafka-tls-enabled | Whether or not to use TLS when connecting to the broker | true |
KAFKA_SASL_ENABLED | kafka-sasl-enabled | Whether or not to use SASL authentication when connecting to the broker | true |
KAFKA_SASL_USER | kafka-sasl-user | Username for SASL/PLAIN or SASL/SCRAM auth | $ConnectionString |
If you don't have Azure certificates as a valid authority on your machine, disable the TLS verification by using the following command:
KAFKA_TLS_INSECURE_SKIP_VERIFY=true
Configure personal connection details
After configuring the previous options, configure Kafka for your personal Event Hub resource.
Environment Variable | Command line option | Description | Example |
---|---|---|---|
KAFKA_URL | kafka-url | List of URLs of Kafka servers to connect to | orchestrate.servicebus.windows.net:9093 |
KAFKA_SASL_PASSWORD | kafka-sasl-password | Password for SASL/PLAIN or SASL/SCRAM auth | Endpoint=sb://orchestrate.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=$$$$$$$$$$$$$ |
Kafka topics
Orchestrate requires the following three topics to work. They are created automatically, so make sure your user credentials are set to allow this action.
Environment Variable | Description | Default |
---|---|---|
TOPIC_TX_SENDER | Topic for messages between the API and the Tx-Sender | topic-tx-sender |
TOPIC_TX_DECODED | Topic for successful transaction messages (receipts) | topic-tx-decoded |
TOPIC_TX_RECOVER | Topic for failed transaction messages | topic-tx-recover |