question

JohnHynes-5564 avatar image
0 Votes"
JohnHynes-5564 asked MayankBargali-MSFT edited

How do I find the reason why my Event Grid messaghes fail to get delivered.

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).

azure-event-grid
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@JohnHynes-5564 Thanks for reaching out. As you have mentioned that you have created the topic with "Cloud Event Schema" and you have configured the Azure logic app event grid trigger. I will get the double confirmation from my team if logic app event grid trigger only supports "EventGridSchema". As per this document when you configured Input Schema as CloudEvents schema then the delivery schema can only be CloudEvents schema. I have tested the same at my end with your scenario and I can see "BadRequest" 500 error while delivery the event to the configured endpoint i.e. Logic app Event grid trigger workflow.

0 Votes 0 ·
rkiss avatar image rkiss MayankBargali-MSFT ·

Hi @MayankBargali-MSFT,

I have no problem to create an Event Grid Subscriber for Cloud Event Schema delivery in the Logic App, see the following screen snippet:

112137-image.png


Note, that the Split On must be Off in the Settings for "When a resource event occurs".

Thanks
Roman




1 Vote 1 ·
image.png (46.3 KiB)

1 Answer

MayankBargali-MSFT avatar image
0 Votes"
MayankBargali-MSFT answered MayankBargali-MSFT edited

@rkiss Thanks for your response. My bad yes it works with disabling the split on property. Currently, we can't use an Event Grid trigger for an Azure Functions app when the event is delivered in the CloudEvents schema as mentioned here but for logic app we need to disable the "Split On" property. Thanks for pointing out as CloudEvents schema delivers one event at a time that is the reason we need to disable the split on property.

@JohnHynes-5564 Can you confirm if you have disabled the split on property on your event grid trigger.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

No, I wasn't aware I needed to do that.

Thank you so much. It's working now.

0 Votes 0 ·

@JohnHynes-5564 Thanks for the confirmation. I have converted the comment to answer. Fell free to "Accept as Answer so that it can help others in the community looking for help on similar topics.

0 Votes 0 ·