Exercise - Evaluate the performance of the deployed event hub using the Azure portal
In this unit, you use the Azure portal to verify your Event Hubs instance is working according to expectations. You also test how Event Hubs messaging works when it's temporarily unavailable, and use Event Hubs metrics to check the performance of your Event Hubs instance.
View Event Hubs activity
Sign into the Azure portal using the same account you used to activate the sandbox.
Find your Event Hubs instance using the Search bar, and open it as we did in the previous exercise.
On the Overview page, view the message counts.
The SimpleSend and EventProcessorSample applications are configured to send/receive 100 messages. Notice that Event Hubs processed 100 messages from the SimpleSend application and transmitted 100 messages to the EventProcessorSample application.
Test Event Hubs resilience
Perform the following steps to find out what happens when an application sends messages to Event Hubs while it's temporarily unavailable.
Resend messages to the Event Hubs instance using the SimpleSend application. Run the following command in Cloud Shell.
cd ~ cd azure-event-hubs/samples/Java/Basic/SimpleSend java -jar ./target/simplesend-1.0.0-jar-with-dependencies.jar
When you get the Send Complete message, press Enter.
Return to the Azure portal. On the Overview page of your Event Hubs Namespace pane, select your Event Hubs instance from the list at the bottom. This shows details specific to the Event Hubs instance. You can also get to this pane with the Event Hubs entry from the namespace page. The Event Hubs Instance pane appears.
In the left menu pane, under Settings, select Configuration. The Configuration pane appears for your Event Hubs instance.
Under EVENT HUB STATUS, select Disabled, and in the top menu bar, select Save changes.
Important
Wait for a minimum of five minutes before proceeding.
Select Active under EVENT HUB STATUS to re-enable your Event Hubs instance, and in the top menu bar, select Save changes.
In Cloud Shell, rerun the EventProcessorSample application to receive messages. Run the following command.
cd ~ cd azure-event-hubs/samples/Java/Basic/EventProcessorSample java -jar ./target/eventprocessorsample-1.0.0-jar-with-dependencies.jar
When messages stop appearing on the console, press Enter.
Back in the Azure portal, go back to your Event Hubs Namespace. If you're still on the Event Hubs page, you can use the breadcrumb on the top of the screen to go backwards. Or you can search for the namespace, and select it.
In the middle menu pane, under Monitoring, select Metrics.
From the Metric dropdown list, select Incoming Messages, and in the taskbar, select Add metric.
From the Metric dropdown list, select Outgoing Messages, and in the taskbar, select Add metric.
At the top right of the chart, select Last 24 hours (Automatic), and in the dialog box that appears, change the time period to Last 30 minutes to expand the data graph. Select Apply.
Notice that even though the messages were sent before the Event Hubs instance was taken offline for a period, all 100 messages were successfully transmitted.
Summary
In this unit, you used the Event Hubs metrics to test that your Event Hubs instance is successfully processing the sending and receiving messages.