Event Grid

Azure Event Grid emulation — namespace topics with pull delivery (api-version 2024-06-01). Compatible with the aznamespaces SDK.

Endpoint

URLhttp://127.0.0.1:10003
ProtocolHTTP / REST
PersistedNo — state is in-memory

Configuration

FlagEnvironment variableDefault
-eventgrid-addrLOCALAZ_EVENTGRID_ADDR:10003

Supported operations

OperationREST surface
Publish Cloud Event(s)POST /topics/{topic}:publish
ReceivePOST /topics/{topic}/eventsubscriptions/{sub}:receive
AcknowledgePOST /topics/{topic}/eventsubscriptions/{sub}:acknowledge
ReleasePOST /topics/{topic}/eventsubscriptions/{sub}:release
RejectPOST /topics/{topic}/eventsubscriptions/{sub}:reject
Renew LocksPOST /topics/{topic}/eventsubscriptions/{sub}:renewLock

CloudEvents are stored and echoed back verbatim (single and batch). Topics and subscriptions are created on first use. Pull delivery uses lock tokens and delivery counts, with acknowledge/release/reject settlement.

Event Grid is SDK-only: az eventgrid is an ARM management-plane command, so there is no CLI data-plane publish/receive surface to redirect to localaz.

Example: Go SDK

const endpoint = "http://127.0.0.1:10003"
sender, _ := aznamespaces.NewSenderClient(endpoint, "my-topic", cred, nil)

event, _ := messaging.NewCloudEvent("source", "type", map[string]string{"k": "v"}, nil)
sender.SendEvent(ctx, &event, nil)

receiver, _ := aznamespaces.NewReceiverClient(endpoint, "my-topic", "sub1", cred, nil)
resp, _ := receiver.ReceiveEvents(ctx, nil)
for _, d := range resp.Details {
    receiver.AcknowledgeEvents(ctx, []string{*d.BrokerProperties.LockToken}, nil)
}

Example: Azure CLI

Not applicable — Event Grid has no CLI data-plane commands that can be pointed at a local endpoint. Use the Go SDK example above.