Skip to content

epomatti/azure-eventhubs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Azure Event Hubs

Event Hubs with capture that writes events to storage.

Create the .auto.tfvars file:

cp infra/templates/sample.tfvars infra/.auto.tfvars

Create the infrastructure:

terraform -chdir="infra" init
terraform -chdir="infra" apply -auto-approve

Run this to quickly get access to the access key:

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:

export AZURE_EVENTHUB_CONNECTION_STRING='Endpoint={endpoint};SharedAccessKeyName={sharedAccessKeyName};SharedAccessKey={sharedAccessKey};EntityPath={entityPath}'
export AZURE_EVENTHUB_NAME="evh-eventprocessor"

Start the application:

mvn spring-boot:run

Send events to Event Hubs:

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.

About

Azure Event Hub integration with Azure Storage

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published