{"id":23557999,"url":"https://github.com/meken/azure-functions-kafka","last_synced_at":"2026-05-07T05:36:03.279Z","repository":{"id":163557111,"uuid":"286720512","full_name":"meken/azure-functions-kafka","owner":"meken","description":"Illustrating how to use Kafka bindings for Azure Functions with Java (using Spring Cloud Functions).","archived":false,"fork":false,"pushed_at":"2020-08-13T11:54:57.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-16T00:41:50.679Z","etag":null,"topics":["azure","azure-functions","azure-functions-v3","java","kafka","spring","spring-boot","spring-cloud","spring-cloud-functions"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meken.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-08-11T10:57:40.000Z","updated_at":"2020-08-13T11:54:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"cf51e94c-edbb-4bcf-954d-3d7a3e95e33e","html_url":"https://github.com/meken/azure-functions-kafka","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/meken/azure-functions-kafka","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meken%2Fazure-functions-kafka","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meken%2Fazure-functions-kafka/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meken%2Fazure-functions-kafka/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meken%2Fazure-functions-kafka/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meken","download_url":"https://codeload.github.com/meken/azure-functions-kafka/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meken%2Fazure-functions-kafka/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271035378,"owners_count":24688396,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure","azure-functions","azure-functions-v3","java","kafka","spring","spring-boot","spring-cloud","spring-cloud-functions"],"created_at":"2024-12-26T15:19:17.419Z","updated_at":"2026-05-07T05:35:58.238Z","avatar_url":"https://github.com/meken.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kafka bindings for Azure Functions\n\nThis is a sample project that illustrates how to use Kafka bindings for Azure Functions with Java (using Spring Cloud Functions).\n\nThis repository includes an ARM template that provisions a number of Azure resources to demonstrate the capability. The template will create an Event Hub with Kafka endpoints, an Application Insights instance for monitoring the application, a Storage Account and a Function App on the Elastic Premium Plan.\n\nThe Function App has two functions, a `producer` that sends every minute a simple message, and a `receiver` that consumes those messages, through Kafka APIs and Azure Functions Kafka bindings. For more information on Azure Functions Kafka bindings, see the [docs](https://github.com/Azure/azure-functions-kafka-extension).\n\n## Setup\n\nAssuming that the Azure CLI and Maven are installed, the following snippets can be used to provision and configure the required resources.\n\n```bash\nRG=...  # the target resource group, assuming that this has been created already\nBASE_NAME=...  # i.e. kafka, choose something with less than 6 alphanumeric characters\nFUNC_APP_NAME=`az deployment group create -g $RG \\\n    --template-file azuredeploy.json \\\n    --parameters baseName=\"$BASE_NAME\" \\\n    --query properties.outputs.functionAppName.value \\\n    -o tsv`\n```\n\n\u003e As some of the Azure resources need to have globally unique names, the included ARM templates attempt to\n\u003e generate more or less unique names by appending a hash of the resource group name to the provided base name\n\u003e If you prefer to have more control or need to use specific names, just update the variables in the templates.\n\u003e At the moment the topic name is hard-coded for the `producer` as the current Kafka bindings library\n\u003e currently cannot handle environment variables (see issue #[158](https://github.com/Azure/azure-functions-kafka-extension/issues/158)).\n\nIf you'd like to experiment with the scaling capabilities of Azure Functions you need to turn that on explicitly by running the following command:\n\n```bash\naz resource update -g $RG -n $FUNC_APP_NAME/config/web \\\n  --resource-type Microsoft.Web/sites \\\n  --set properties.functionsRuntimeScaleMonitoringEnabled=1 \\\n  -o none\n```\n\n## Development\n\nBefore you can run the code locally, you need to make sure that the native libraries for the Azure Functions extensions are initialized. The following Maven command takes care of that through the [Azure Functions Maven Plugin](https://github.com/microsoft/azure-maven-plugins/tree/master/azure-functions-maven-plugin)\n\n```bash\nmvn package -DfunctionAppName=$FUNC_APP_NAME\n```\n\nYou can now use either Maven or your favourite IDE to run/debug your code, just make sure that you've configured your `local.settings.json` properly and started your local [Azure Storage Emulator](https://docs.microsoft.com/en-us/azure/storage/common/storage-use-emulator). See below for an example local settings file where Event Hub is used as the Kafka endpoint.\n\n```json\n{\n  \"IsEncrypted\": false,\n  \"Values\": {\n    \"AzureWebJobsStorage\": \"UseDevelopmentStorage=true\",\n    \"FUNCTIONS_WORKER_RUNTIME\": \"java\",\n    \"BROKERS\": \"\u003cevent hub namespace\u003e.servicebus.windows.net:9093\",\n    \"KAFKA_TOPIC\": \"\u003cevent hub name\u003e\",\n    \"KAFKA_USER\": \"$ConnectionString\",\n    \"KAFKA_PASSWORD\": \"\u003cevent hub SAS key\u003e\"\n  }\n}\n```\n\nFor more information on how to run Azure Functions in Java locally have a look at the [docs](https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-java?tabs=consumption).\n\n## Deployment\n\nFirst, run the following command to build the project:\n\n```bash\nmvn clean package -DfunctionAppName=$FUNC_APP_NAME\n```\n\nNow you've got multiple ways of deploying the application; in this example we'll use the deploy capabilities of the Azure Functions Maven plugin, but alternatively we could've packaged the binaries in a zip file and do a zip deployment through [Azure CLI](https://docs.microsoft.com/en-us/azure/azure-functions/deployment-zip-push#cli).\n\n```bash\nmvn azure-functions:deploy -DresourceGroupName=$RG -DfunctionAppName=$FUNCTION_APP_NAME\n```\n\nThat's it, you can monitor the behaviour through the Azure Portal and/or Application Insights.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeken%2Fazure-functions-kafka","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeken%2Fazure-functions-kafka","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeken%2Fazure-functions-kafka/lists"}