I have created a Custom Topic for my event grid for Cloud Events v1.0.
I have a logic app that is subscribed to the event grid for this topic. I have sent messages from PowerShell and from an App Service.
The logic app never receives the events.
If I try and query the Event Grid Logs for the delivery failures I always get this response:
'parse' operator: Failed to resolve table or column expression named 'AegDeliveryFailureLogs' If issue persists, please open a support ticket.
There is no AegDeliveryFailureLogs table showing in the Logs, there is just one table called AzureMetrics.
If I search the storage account for log files, I just find logs saying that the delivery failure reason is "BadRequest". But I can't determine why the request is bad.
Here is my code to send the event.
string topicEndpoint = "myEndpoint";
string sasKey = "myAegSasKey";
string eventSource = configuration.GetValue<string>( "CloudEventSource" );
EventGridPublisherClient client = new EventGridPublisherClient( new Uri( topicEndpoint ), new AzureKeyCredential( sasKey ) );
var cloudEvent = new CloudEvent
{
Type = "Microsoft.EventGrid/Topics",
Source = new Uri( eventSource ),
Data = JsonSerializer.Serialize( new { myQueueItem.RecordId, myQueueItem.Action } ),
Time = myQueueItem.AuditDate,
Id = Guid.NewGuid().ToString(),
Subject = myQueueItem.Table + "-" + myQueueItem.Action
};
var response = client.SendCloudEventAsync( cloudEvent ).Result;
The response received from this request is always 200 (OK).