Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/epomatti/azure-eventhubs
Azure Event Hub integration with Azure Storage
https://github.com/epomatti/azure-eventhubs
avro azure azure-eventhub java spring
Last synced: 3 days ago
JSON representation
Azure Event Hub integration with Azure Storage
- Host: GitHub
- URL: https://github.com/epomatti/azure-eventhubs
- Owner: epomatti
- License: mit
- Created: 2022-09-30T02:22:34.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-04T19:27:28.000Z (about 1 year ago)
- Last Synced: 2023-10-05T05:47:23.816Z (about 1 year ago)
- Topics: avro, azure, azure-eventhub, java, spring
- Language: Java
- Homepage:
- Size: 77.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Azure Event Hubs
Event Hubs with capture that writes events to storage.
Create the `.auto.tfvars` file:
```sh
cp infra/templates/sample.tfvars infra/.auto.tfvars
```Create the infrastructure:
```sh
terraform -chdir="infra" init
terraform -chdir="infra" apply -auto-approve
```Run this to quickly get access to the access key:
```sh
az eventhubs namespace authorization-rule keys list \
--name RootManageSharedAccessKey \
-g rg-eventprocessor \
--namespace-name evhns-eventprocessor-2069 \
--query primaryConnectionString -o tsv
```Add variables to your session:
```sh
export AZURE_EVENTHUB_CONNECTION_STRING='Endpoint={endpoint};SharedAccessKeyName={sharedAccessKeyName};SharedAccessKey={sharedAccessKey};EntityPath={entityPath}'
export AZURE_EVENTHUB_NAME="evh-eventprocessor"
```Start the application:
```sh
mvn spring-boot:run
```Send events to Event Hubs:
```sh
curl -X POST -H "Content-Type: application/json" -d '{"id":"123"}' localhost:8080/api/events/
```Data should be sent to the Storage in `Avro` format.