Skip to content

YijunXieMS/eventhubs-latency

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eventhubs-latency

Configuration

Add or edit file BareSDK/src/main/resources/application.properties.

eventhub.connection_string=
eventhub.consumer_group=$Default
eventhub.partition=0
eventhub.test_number_of_events=1000

Add your own eventhub.connection_string to the above mentioned file like this.

eventhub.connection_string=Endpoint=sb://anamespace.servicebus.windows.net/;SharedAccessKeyName=SomeKey;SharedAccessKey=a4xbgNrqFT3tlN5Ak1jWvhSXmnuClOjkNMTQ81posWA=;EntityPath=eventhubname

Pay attention that the connection string has the EntityPath section.

To receive events with Spring Stream, Create Azure Credential File and Configure the Spring Boot app

Run the latency test

Both tests use the same code to send events. The difference is one use the EventHubConsumerAsyncClient to receive whereas the other one uses EventProcessorClient to receive.

Go to folder BareSDK. Start one of the three receiving application Receive with EventHubConsumerAsyncClient

mvn compile exec:java -Dexec.mainClass="eventhubs.latency.bare.app.ConsumerApplication"

Receive with the EventProcessorClient

mvn compile exec:java -Dexec.mainClass="eventhubs.latency.bare.app.EventProcessorApplication"

Receive with Spring Stream

mvn spring-boot:run

Wait a few seconds until the receiving app starts. Then use the following command to send 1000 events until you see "Total send time in milliseconds: ". Then go back to the receiving app and press ENTER to see the test result.

mvn compile exec:java -Dexec.mainClass="eventhubs.latency.bare.app.ProducerApplication"

Test Result

Refer to TestResult.md

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages