|
| 1 | +--- |
| 2 | +title: Stream data from Azure Stream Analytics into Kafka |
| 3 | +description: Learn about setting up Azure Stream Analytics as a producer to kafka |
| 4 | +author: enkrumah |
| 5 | +ms.author: ebnkruma |
| 6 | +ms.service: stream-analytics |
| 7 | +ms.topic: conceptual |
| 8 | +ms.date: 09/26/2023 |
| 9 | +--- |
| 10 | + |
| 11 | +# Kafka output from Azure Stream Analytics (Preview) |
| 12 | + |
| 13 | +Azure Stream Analytics allows you to connect directly to Kafka clusters as a producer to output data. The solution is low code and entirely managed by the Azure Stream Analytics team at Microsoft, allowing it to meet business compliance standards. The Kafka Adapters are backward compatible and support all versions with the latest client release starting from version 0.10. Users can connect to Kafka clusters inside a VNET and Kafka clusters with a public endpoint, depending on the configurations. The configuration relies on existing Kafka configuration conventions. |
| 14 | +Supported compression types are None, Gzip, Snappy, LZ4, and Zstd. |
| 15 | + |
| 16 | +## Authentication and encryption |
| 17 | + |
| 18 | +You can use four types of security protocols to connect to your Kafka clusters: |
| 19 | + |
| 20 | +|Property name |Description | |
| 21 | +|----------|-----------| |
| 22 | +|mTLS |encryption and authentication | |
| 23 | +|SASL_SSL |It combines two different security mechanisms - SASL (Simple Authentication and Security Layer) and SSL (Secure Sockets Layer) - to ensure both authentication and encryption are in place for data transmission. | |
| 24 | +|Kafka topic |A unit of your Kafka cluster you want to write events to. | |
| 25 | +|SASL_PLAINTEXT |standard authentication with username and password without encryption | |
| 26 | +|None |The serialization format (JSON, CSV, Avro, Parquet) of the incoming data stream. | |
| 27 | + |
| 28 | + |
| 29 | +> [!IMPORTANT] |
| 30 | +> Confluent Cloud supports authenticating using API Keys, OAuth, or SAML single sign-on (SSO). Azure Stream Analytics does not currently support these authentication options. |
| 31 | +> |
| 32 | +
|
| 33 | + |
| 34 | +### Key vault integration |
| 35 | + |
| 36 | +> [!NOTE] |
| 37 | +> When using trust store certificates with mTLS or SASL_SSL security protocols, you must have Azure Key vault and managed identity configured for your Azure Stream Analytics job. |
| 38 | +> |
| 39 | +Azure Stream Analytics integrates seamlessly with Azure Key vault to access stored secrets needed for authentication and encryption when using mTLS or SASL_SSL security protocols. Your Azure Stream Analytics job connects to Azure Key vault using managed identity to ensure a secure connection and avoid the exfiltration of secrets. |
| 40 | + |
| 41 | +You can store the certificates as Key vault certificates or Key vault secrets. Private keys are in PEM format. |
| 42 | + |
| 43 | +### VNET integration |
| 44 | +When configuring your Azure Stream Analytics job to connect to your Kafka clusters, depending on your configuration, you may have to configure your job to access your Kafka clusters, which are behind a firewall or inside a virtual network. You can visit the Azure Stream Analytics VNET documentation to learn more about configuring private endpoints to access resources inside a virtual network or behind a firewall. |
| 45 | + |
| 46 | + |
| 47 | +### Configuration |
| 48 | +The following table lists the property names and their description for creating a Kafka output: |
| 49 | + |
| 50 | +| Property name | Description | |
| 51 | +|------------------------------|-------------------------------------------------------------------------------------------------------------------------| |
| 52 | +| Input/Output Alias | A friendly name used in queries to reference your input or output | |
| 53 | +| Bootstrap server addresses | A list of host/port pairs to establish the connection to the Kafka cluster. | |
| 54 | +| Kafka topic | A unit of your Kafka cluster you want to write events to. | |
| 55 | +| Security Protocol | How you want to connect to your Kafka cluster. Azure Stream Analytics supports mTLS, SASL_SSL, SASL_PLAINTEXT or None. | |
| 56 | +| Event Serialization format | The serialization format (JSON, CSV, Avro) of the outgoing data stream. | |
| 57 | +| Partition key | Azure Stream Analytics assigns partitions using round partitioning. | |
| 58 | +| Kafka event compression type | The compression type used for outgoing data streams, such as Gzip, Snappy, Lz4, Zstd, or None. | |
| 59 | + |
| 60 | +### Limitations |
| 61 | +* When configuring your Azure Stream Analytics jobs to use VNET/SWIFT, your job must be configured with at least six (6) streaming units. |
| 62 | +* When using mTLS or SASL_SSL with Azure Key vault, you must convert your Java Key Store to PEM format. |
| 63 | +* The minimum version of Kafka you can configure Azure Stream Analytics to connect to is version 0.10. |
| 64 | + |
| 65 | +> [!NOTE] |
| 66 | +> For direct help with using the Azure Stream Analytics Kafka adapter, please reach out to [[email protected]](mailto:[email protected]). |
| 67 | +> |
| 68 | +
|
| 69 | +## Next steps |
| 70 | +> [!div class="nextstepaction"] |
| 71 | +> [Quickstart: Create a Stream Analytics job by using the Azure portal](stream-analytics-quick-create-portal.md) |
| 72 | +
|
| 73 | +<!--Link references--> |
| 74 | +[stream.analytics.developer.guide]: ../stream-analytics-developer-guide.md |
| 75 | +[stream.analytics.scale.jobs]: stream-analytics-scale-jobs.md |
| 76 | +[stream.analytics.introduction]: stream-analytics-introduction.md |
| 77 | +[stream.analytics.get.started]: stream-analytics-real-time-fraud-detection.md |
| 78 | +[stream.analytics.query.language.reference]: /stream-analytics-query/stream-analytics-query-language-reference |
0 commit comments