You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/event-hubs/send-and-receive-events-using-data-generator.md
+22-26Lines changed: 22 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,51 +5,48 @@ author: Saglodha # GitHub alias
5
5
ms.author: saglodha # Microsoft alias
6
6
ms.service: event-hubs
7
7
ms.topic: quickstart
8
-
ms.date: 05/22/2023
8
+
ms.date: 06/07/2024
9
9
---
10
10
11
11
# QuickStart: Send and receive events using Azure Event Hubs Data Generator
12
12
13
-
In this QuickStart, you learn how to Send and Receive Events using Azure Event Hubs Data Generator.
13
+
In this QuickStart, you learn how to send and receive Events using Azure Event Hubs Data Generator.
14
14
15
15
### Prerequisites
16
16
17
17
If you're new to Azure Event Hubs, see the [Event Hubs overview](event-hubs-about.md) before you go through this QuickStart.
18
18
19
19
To complete this QuickStart, you need the following prerequisites:
20
20
21
-
-Microsoft Azure subscription. To use Azure services, including Azure Event Hubs, you need a subscription. If you don't have an existing Azure account, you can sign up for a [free trial](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
22
-
- Create Event Hubs namespace and an event hub. The first step is to use the Azure portal to create an Event Hubs namespace and an event hub in the namespace. To create a namespace and an event hub, see [QuickStart: Create an event hub using Azure portal](event-hubs-create.md).
23
-
- If the event hub is in a virtual network, you need to access the portal from a VM in the same virtual network. The data generator doesn't work with private endpoints with public access blocked unless you access the portal from the subnet of the virtual network for which the private endpoint is configured.
21
+
- Azure subscription. To use Azure services, including Azure Event Hubs, you need a subscription. If you don't have an existing Azure account, you can sign up for a [free trial](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
22
+
- Create an Event Hubs namespace and an event hub using instructions from [QuickStart: Create an event hub using Azure portal](event-hubs-create.md).
23
+
- If the event hub is in a virtual network, you need to access the portal from a virtual machine (VM) in the same virtual network. The data generator doesn't work with private endpoints with public access blocked unless you access the portal from the subnet of the virtual network for which the private endpoint is configured.
24
24
25
25
> [!NOTE]
26
-
> Data Generator for Azure Event Hubs is in Public Preview.
26
+
> Data Generator for Azure Event Hubs is in preview.
27
27
28
28
## Send events using Event Hubs Data Generator
29
29
30
30
You could follow these steps to send events to Azure Event Hubs Data Generator:
31
31
32
32
1. On the **Event Hubs Namespace** page, select **Generate data** in the **Overview** section on the left navigation menu.
2. On the **Generate Data** page, you would find the properties for Data generation:
37
-
1.**Select Event Hub:** Since you would be sending data to event hub, you could use the dropdown to send the data into event hubs of your choice. If there's no event hub created within event hubs namespaces, you could use “create Event Hubs” to [create a new event hub](event-hubs-create.md) within namespace and stream data post creation of event hub.
38
-
2.**Select Payload:** You could send custom payload to event hubs using User defined payload or make use of different pre-canned datasets available in data generator.
39
-
3.**Select Content-Type:** Based on the type of data you’re sending; you could choose the Content-type Option. As of today, Data generator supports sending data in following content-type - JSON, XML, Text, and Binary.
40
-
4.**Repeat send**:-If you want to send the same payload as multiple events, you can enter the number of repeat events that you wish to send. Repeat Send supports sending up to 100 repetitions.
41
-
5.**Authentication Type**: Under settings, you can choose from two different authentication type: Shared Access key or Microsoft Entra ID. Make sure that you have Azure Event Hubs Data owner permission before using Microsoft Entra ID.
34
+
:::image type="content" source="media/send-and-receive-events-using-data-generator/generate-data-menu.png" alt-text="Screenshot that shows the Generate data (preview) menu on an Event Hubs Namespace page." lightbox="media/send-and-receive-events-using-data-generator/generate-data-menu.png":::
35
+
2. On the **Generate Data** page, follow these steps:
36
+
1. For the **Select event hub** field, use the dropdown list to send the data to an event hub in the namespace.
37
+
1. For the **Select dataset** field, select a precanned dataset such as **Weather data** and **Clickstream data** or select **Custom payload** option and specify your own payload.
38
+
1. If you select **Custom payload**, for the **Select Content-Type** field, choose the type of the content in the event data. Currently, Data generator supports sending data in following content types: JSON, XML, Text, and Binary.
39
+
1. For the **Repeat send** field, enter the number of times you want to send the sample dataset to the event hub. The maximum allowed value is 100.
42
40
43
-
:::image type="content" source="media/send-and-receive-events-using-data-generator/highlighted-data-generator-landing.png" alt-text="Screenshot displaying landing page for data generator.":::
41
+
:::image type="content" source="media/send-and-receive-events-using-data-generator/highlighted-data-generator-landing.png" alt-text="Screenshot displaying landing page for data generator." lightbox="media/send-and-receive-events-using-data-generator/highlighted-data-generator-landing.png":::
44
42
45
43
> [!TIP]
46
-
> For user defined payload, the content under the "Enter payload" section is treated as a single event The number of events sent is equal to the value of repeat send.
44
+
> For custom payload, the content in the **Enter payload** section is treated as a single event. The number of events sent is equal to the value of repeat send.
47
45
>
48
-
> Pre-canned datasets are collection of events. For pre-canned datasets, each event in the dataset is sent separately. For example, if the dataset has 20 events and the value of repeat send is 10, then 200 events are sent to the event hub.
49
-
50
-
### Maximum Message size support with different tier
46
+
> Pre-canned datasets are collection of events. For pre-canned datasets, each event in the dataset is sent separately. For example, if the dataset has 50 events and the value of repeat send is 10, then 500 events are sent to the event hub.
51
47
52
-
You could send data until the permitted payload size with Data Generator. The following table talks about maximum message/payload size that you could send with Data Generator.
48
+
### Maximum message size support with different tiers
49
+
The following table shows the maximum payload size that you can send to an event hub using the Data Generator.
53
50
54
51
| Tier | Basic | Standard | Premium | Dedicated |
55
52
|--|--|--|--|--|
@@ -58,23 +55,22 @@ You could send data until the permitted payload size with Data Generator. The fo
58
55
## View events using Event Hubs Data Generator
59
56
60
57
> [!IMPORTANT]
61
-
> View Events is meant to act like a magnifying glass to the stream of events that you had sent. The tabular section under View events would let you glance at the last 15 events that have been sent to Azure Event hubs.If the event content is in format that cannot be loaded, View events would show metadata for the event.
58
+
> Viewing events is meant to act like a magnifying glass to the stream of events that you sent. The tabular section in the **View events** section lets you glance at the last 15 events that have been sent to the event hub. If the event content is in format that cannot be loaded, ther **View events** section shows metadata for the event.
62
59
63
-
As soon as you select send, data generator would take care of sending the events to event hubs of your choice and new collapsible “View Events” window would load automatically. You could expand any tabular row to review the event content sent to event hubs.
60
+
As soon as you select **Send**, data generator sends events to the selected event hub and the collapsible **View events** section loads automatically. Expand any tabular row to review the event content sent to event hubs.
64
61
65
62
:::image type="content" source="media/send-and-receive-events-using-data-generator/view-events-window.png" alt-text="Screenshot for event hub data generator UI showcasing View events." lightbox="media/send-and-receive-events-using-data-generator/view-events-window.png":::
66
63
67
64
## Frequently asked questions
68
65
69
-
-**I am getting the error “Oops! We couldn't read events from Event Hub -`<your event hub name>`. Please make sure that there is no active consumer reading events from $Default Consumer group**”
66
+
-**I am getting the error “Oops! We couldn't read events from the event hub -`<your event hub name>`. Please make sure that there is no active consumer reading events from $Default Consumer group**”
70
67
71
68
72
-
Data generator makes use of $Default [consumer group](event-hubs-features.md) to view events that have been sent to Event hubs. To start receiving events from event hubs, a receiver needs to connect to consumer group and take ownership of the underlying partition. If in case, there is already a consumer reading from $Default consumer group, then Data generator wouldn’t be able to establish a connection and view events. Additionally, If you have an active consumer silently listening to the events and checkpointing them, then data generator wouldn't find any events in event hub. Disconnect any active consumer reading from $Default consumer group and try again.
69
+
Data generator makes use of `$Default`[consumer group](event-hubs-features.md) to view events that were sent to the event hub. To start receiving events from event hubs, a receiver needs to connect to consumer group and take ownership of the underlying partition. If there's already a consumer reading from `$Default` consumer group, the data generator wouldn’t be able to establish a connection and view events. Additionally, If you have an active consumer silently listening to the events and checkpointing them, the data generator wouldn't find any events in the event hub. Disconnect any active consumer reading from `$Default` consumer group and try again.
73
70
74
71
-**I am observing additional events in the View events section from the ones I had sent using Data Generator. Where are those events coming from?**
75
72
76
-
77
-
Multiple applications can connect to event hubs at the same time. If in case, there are multiple applications sending data to event hubs alongside Data generator, view events section would also show events sent by other clients. At any instance, view events would let you read last 15 events that have sent to Azure Event Hubs.
73
+
Multiple applications can connect to event hubs at the same time. If there are multiple applications sending data to event hubs alongside data generator, view events section also shows events sent by other clients. At any instance, the view events section lets you view the last 15 events that were sent to Azure Event Hubs.
0 commit comments