Skip to content

Commit

Permalink
Add pointers to new packages in readme files at the root and for .Net…
Browse files Browse the repository at this point in the history
… legacy package (#478)

* Add pointers to new packages in readme files

* re-arrange readme

* Update Java readme too
  • Loading branch information
ramya-rao-a authored Apr 16, 2021
1 parent 10df2c2 commit 71ed5ea
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Role based access sample #
# Role based access sample with WindowsAzure.ServiceBus SDK

For more information on Role based access (RBAC) and how to run this sample follow [this](https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-role-based-access-control) link.
See [Authorize access to Event Hubs resources using Azure Active Directory](https://docs.microsoft.com/azure/event-hubs/authorize-access-azure-active-directory) for information on Role based access (RBAC).

**Note**: This sample shows different ways to authenticate using Azure Active Directory with the legacy Event Hubs library `WindowsAzure.ServiceBus`.
For the current version of the library `Azure.Messaging.EventHubs`, please see the [sample that makes use of credentials from Azure.Identity](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample06_IdentityAndSharedAccessCredentials.md).
1 change: 1 addition & 0 deletions samples/DotNet/Microsoft.ServiceBus/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
> **Note:** : This folder has samples for the legacy package WindowsAzure.ServiceBus that can be used for Azure Event Hubs. There is a newer package [Azure.Messaging.EventHubs](https://www.nuget.org/packages/Azure.Messaging.EventHubs) available as of February 2020. Please refer to [samples for the Azure.Messaging.EventHubs client library](https://docs.microsoft.com/samples/azure/azure-sdk-for-net/azuremessagingeventhubs-samples/) instead.
36 changes: 19 additions & 17 deletions samples/Java/README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
# Azure Event Hubs Java samples

Azure Event Hubs is a highly scalable data streaming platform and event ingestion service, capable of receiving and processing millions of events per second. The samples present here enables Java developers to easily ingest and process events from your event hub.
**Note:**: The samples present here enables Java developers to easily ingest and process events from an instance of [Azure Event Hubs](https://docs.microsoft.com/azure/event-hubs/event-hubs-about) using the legacy libraries `com.microsoft.azure:azure-eventhubs` and `com.microsoft.azure:azure-eventhubs-eph`. We strongly recommend you to use the current library `com.azure:azure-messaging-eventhubs` instead.

- [Java samples for current Azure Event Hubs client library](https://docs.microsoft.com/en-us/samples/azure/azure-sdk-for-java/eventhubs-samples/)
- [Java samples for current Azure Event Hubs Checkpoint Store client library](https://docs.microsoft.com/samples/azure/azure-sdk-for-java/eventhubs-samples/)

## Prerequisites

1. The samples depend on the Java JDK 1.8 and are built using Maven. You can [download Maven](https://maven.apache.org/download.cgi). [Install and configure Maven](https://maven.apache.org/install.html). The sample require Maven version > 3.3.9.
2. You need an Azure Subscription, if you do not have one - create a [free account](https://azure.microsoft.com/free/?ref=microsoft.com&utm_source=microsoft.com&utm_medium=docs&utm_campaign=visualstudio) before you begin
3. [An Event Hubs namespace and an event hub where you ingest the data](https://docs.microsoft.com/azure/event-hubs/event-hubs-create)
4. [A SAS key to access the event hub](https://docs.microsoft.com/azure/event-hubs/event-hubs-create#SAS)
1. The samples depend on the Java JDK 1.8 and are built using Maven. You can [download Maven](https://maven.apache.org/download.cgi). [Install and configure Maven](https://maven.apache.org/install.html). The sample require Maven version > 3.3.9.
2. You need an Azure Subscription, if you do not have one - create a [free account](https://azure.microsoft.com/free/?ref=microsoft.com&utm_source=microsoft.com&utm_medium=docs&utm_campaign=visualstudio) before you begin
3. [An Event Hubs namespace and an event hub where you ingest the data](https://docs.microsoft.com/azure/event-hubs/event-hubs-create)
4. [A SAS key to access the event hub](https://docs.microsoft.com/azure/event-hubs/event-hubs-create#SAS)

### Sending events

* **SendBatch** - The [SendBatch](./Basic/SendBatch) sample illustrates how to ingest batches of events into your event hub.
* **SimpleSend** - The [SimpleSend](./Basic/SimpleSend) sample illustrates how to ingest events into your event hub.
* **AdvanceSendOptions** - The [AdvancedSendOptions](./Basic/AdvancedSendOptions) sample illustrates the various options available with Event Hubs to ingest events.

### Processing events
- **SendBatch** - The [SendBatch](./Basic/SendBatch) sample illustrates how to ingest batches of events into your event hub.
- **SimpleSend** - The [SimpleSend](./Basic/SimpleSend) sample illustrates how to ingest events into your event hub.
- **AdvanceSendOptions** - The [AdvancedSendOptions](./Basic/AdvancedSendOptions) sample illustrates the various options available with Event Hubs to ingest events.

* **ReceiveByDateTime** - The [ReceiveByDateTime](./Basic/ReceiveByDateTime) sample illustrates how to receive events from an event hub partition using a specific date-time offset.
* **ReceiveUsingOffset** - The [ReceiveUsingOffset](./Basic/ReceiveUsingOffset) sample illustrates how to receive events from an event hub partition using a specific data offset.
* **ReceiveUsingSequenceNumber** - The [ReceiveUsingSequenceNumber](./Basic/ReceiveUsingSequenceNumber) sample illustrates how can receive from an event hub partitions using a sequence number.
* **EventProcessorSample** - The [EventProcessorSample](./Basic/EventProcessorSample) sample illustrates how to receive events from an event hub using the event processor host, which provides automatic partition selection and fail-over across multiple concurrent receivers.
### Processing events

- **ReceiveByDateTime** - The [ReceiveByDateTime](./Basic/ReceiveByDateTime) sample illustrates how to receive events from an event hub partition using a specific date-time offset.
- **ReceiveUsingOffset** - The [ReceiveUsingOffset](./Basic/ReceiveUsingOffset) sample illustrates how to receive events from an event hub partition using a specific data offset.
- **ReceiveUsingSequenceNumber** - The [ReceiveUsingSequenceNumber](./Basic/ReceiveUsingSequenceNumber) sample illustrates how can receive from an event hub partitions using a sequence number.
- **EventProcessorSample** - The [EventProcessorSample](./Basic/EventProcessorSample) sample illustrates how to receive events from an event hub using the event processor host, which provides automatic partition selection and fail-over across multiple concurrent receivers.

### Benchmarks

* **AutoScaleOnIngress** - The [AutoScaleOnIngress](./Benchmarks/AutoScaleOnIngress) sample illustrates how an event hub can automatically scale up on high loads. The sample will send events at a rate that just exceed the configured rate of an event hub, causing the event hub to scale up.
* **IngressBenchmark** - The [IngressBenchmark](./Benchmarks/IngressBenchmark) sample allows measuring the ingress rate.
- **AutoScaleOnIngress** - The [AutoScaleOnIngress](./Benchmarks/AutoScaleOnIngress) sample illustrates how an event hub can automatically scale up on high loads. The sample will send events at a rate that just exceed the configured rate of an event hub, causing the event hub to scale up.
- **IngressBenchmark** - The [IngressBenchmark](./Benchmarks/IngressBenchmark) sample allows measuring the ingress rate.

## Build and run

Expand All @@ -40,4 +42,4 @@ The samples are dropped into the respective sample's ./target subfolder. The bui

```bash
java -jar ./target/{project}-1.0.0-jar-with-dependencies.jar
```
```
29 changes: 19 additions & 10 deletions samples/README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@
# Azure Event Hubs samples

## .NET
**Note:** This repository holds samples for the legacy libraries for Azure Event Hubs for .NET and Java developers. We highly recommend you to upgrade to the newer packages.

### Microsoft.Azure.EventHubs
Any samples within the `Azure.Microsoft.EventHubs` folder target the newer .NET Standard library.
.NET legacy packages

#### SampleSender
- Microsoft.Azure.EventHubs (**legacy**)
- Microsoft.Azure.EventHubs.Processor (**legacy**)
- WindowsAzure.ServiceBus (**legacy**)

[This sample](./DotNet/Microsoft.Azure.EventHubs/SampleSender/readme.md) shows how to write a .NET Core console application that sends a set of messages to an Event Hub.
Java legacy packages

#### SampleEphReceiver
- com.microsoft.azure:azure-eventhubs (**legacy**)
- com.microsoft.azure:azure-eventhubs-eph (**legacy**)

[This sample](./DotNet/Microsoft.Azure.EventHubs/SampleEphReceiver/readme.md) shows how to write a .NET Core console application that receives messages from an Event Hub using the **EventProcessorHost**.
Samples for **latest** .NET packages for Azure Event Hubs

## Java
- [Azure.Messaging.EventHubs](https://docs.microsoft.com/samples/azure/azure-sdk-for-net/azuremessagingeventhubs-samples/)
- [Azure.Messaging.EventHubs.Processor](https://docs.microsoft.com/samples/azure/azure-sdk-for-net/azuremessagingeventhubsprocessor-samples/)

[Go here](./Java) for the Java language samples.
Samples for **latest** Java packages for Azure Event Hubs

- [com.azure:azure-messaging-eventhubs](https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/eventhubs/azure-messaging-eventhubs/src/samples)
- [com.azure:azure-messaging-eventhubs-checkpointstore-blob](https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/samples)

## Miscellaneous

### Manage Event Hubs resources

The samples under the folder `Management` in this repository show how to manage your Event Hubs resources via CLI, the .NET package `Microsoft.Azure.Management.EventHub` and PowerShell

### proton-c-sender-dotnet-framework-receiver

[This sample](./Miscellaneous/proton-c-sender-dotnet-framework-receiver/README.md) shows how to use Azure Event Hubs with clients that use different protocols. This scenario sends using an Apache Proton C++ client, and receives using the .NET Framework client.

0 comments on commit 71ed5ea

Please sign in to comment.