skills.vishalvoidskills/vishalvoid
Technical & DevelopmentIntermediate

azure-eventgrid-java

Event-driven pub/sub messaging

Developer Setup

Setup & Installation

bash
npx skills add https://github.com/microsoft/skills --skill azure-eventgrid-java

Overview

What This Skill Does

Azure Event Grid SDK for Java lets you publish and receive events using Azure Event Grid topics and namespaces. It supports EventGrid native schema, CloudEvents 1.0, and custom schemas. Use it to wire up event-driven workflows between Java services and Azure.

Application

When to use this Skill

Documentation

Show Skills.md file

Azure Event Grid SDK for Java

Build event-driven applications using the Azure Event Grid SDK for Java.

Installation

<dependency>
    <groupId>com.azure</groupId>
    <artifactId>azure-messaging-eventgrid</artifactId>
    <version>4.27.0</version>
</dependency>

Client Creation

EventGridPublisherClient

import com.azure.messaging.eventgrid.EventGridPublisherClient;
import com.azure.messaging.eventgrid.EventGridPublisherClientBuilder;
import com.azure.core.credential.AzureKeyCredential;

// With API Key
EventGridPublisherClient<EventGridEvent> client = new EventGridPublisherClientBuilder()
    .endpoint("<topic-endpoint>")
    .credential(new AzureKeyCredential("<access-key>"))
    .buildEventGridEventPublisherClient();

// For CloudEvents
EventGridPublisherClient<CloudEvent> cloudClient = new EventGridPublisherClientBuilder()
    .endpoint("<topic-endpoint>")
    .credential(new AzureKeyCredential("<access-key>"))
    .buildCloudEventPublisherClient();
Lines 1 - 35 of 311

Recommendations

Explore other random skills

All skillsMy patterns