About This Page
This page is part of the Azure documentation. It contains code examples and configuration instructions for working with Azure services.
Bias Analysis
Bias Types:
⚠️
windows_first
⚠️
missing_linux_example
Summary:
The documentation demonstrates a Windows bias primarily in the application development and event processing sections. While the Azure CLI and curl commands are cross-platform, the only example for building a listener application is for C# using Visual Studio on Windows, with explicit instructions to use Visual Studio 2019 or later. There are no equivalent instructions or examples for Linux or macOS users, nor are alternative languages or tools highlighted for non-Windows environments.
Recommendations:
- Add explicit instructions and examples for building and running the listener application on Linux and macOS, including how to use .NET Core/SDK and cross-platform editors like VS Code.
- Provide alternative sample applications in additional languages (e.g., Python, Node.js) that are commonly used on Linux.
- Clarify that Visual Studio is not required and that .NET projects can be built and run using the dotnet CLI on any OS.
- Include links to cross-platform setup guides for .NET and other supported languages.
- Where possible, mention Linux and macOS as supported environments in the prerequisites and throughout the tutorial.
Create pull request
Flagged Code Snippets
Notice that an [expiration date](concepts.md#event-subscription-expiration) is set for the subscription.
## Create application to process events
You need an application that can retrieve events from the hybrid connection. The [Microsoft Azure Event Grid Hybrid Connection Consumer sample for C#](https://github.com/Azure-Samples/event-grid-dotnet-hybridconnection-destination) performs that operation. You've already finished the prerequisite steps.
1. Make sure you have Visual Studio 2019 or later.
1. Clone the repository to your local machine.
1. Load HybridConnectionConsumer project in Visual Studio.
1. In Program.cs, replace `<relayConnectionString>` and `<hybridConnectionName>` with the relay connection string and hybrid connection name that you created.
1. Compile and run the application from Visual Studio.
> [!IMPORTANT]
> We use connection string to authenticate to Azure Relay namespace to keep the tutorial simple. We recommend that you use Microsoft Entra ID authentication in production environments. When using an application, you can enable managed identity for the application and assign the identity an appropriate role (Azure Relay Owner, Azure Relay Listener, or Azure Relay Sender) on the Relay namespace. For more information, see [Authenticate a managed identity with Microsoft Entra ID to access Azure Relay resources](../azure-relay/authenticate-managed-identity.md).
## Send an event to your topic
Let's trigger an event to see how Event Grid distributes the message to your endpoint. This article shows how to use Azure CLI to trigger the event. Alternatively, you can use [Event Grid publisher application](https://github.com/Azure-Samples/event-grid-dotnet-publish-consume-events/tree/master/EventGridPublisher).
First, let's get the URL and key for the custom topic. Again, use your custom topic name for `<topic_name>`.