azureazure-eventgrid

Event topic not delivering data


I have the following issues:

Created event grid topic Azure Created custom trigger in adf which created subscription in event topic

I have 2 environments

For the testing environment the trigger is working ok

For the prod environment the trigger is not starting enter image description here

As you see for Delivered items there is 0, but there is an activity in Advanced Filtering why is that?

Thank you


Solution

  • Methods to set Advanced Filter event grid from Comments.

    enter image description here

    enter image description here

    enter image description here

    az eventgrid topic show --name <your-resource-name> --resource-group <your-resource-group-name> --query "endpoint"
    
    az eventgrid topic key list --name <your-resource-name> --resource-group <your-resource-group-name> --query "key1"
    
    $topicName = <your-topic-name>
    $endpointURL = <endpoint-URL>
    
    New-AzResourceGroup -Name gridResourceGroup -Location eastus2
    New-AzEventGridTopic -ResourceGroupName gridResourceGroup -Location eastus2 -Name $topicName
    
    $topicid = (Get-AzEventGridTopic -ResourceGroupName gridResourceGroup -Name $topicName).Id
    
    $expDate = '<mm/dd/yyyy hh:mm:ss>' | Get-Date
    $AdvFilter1=@{operator="StringIn"; key="Data.color"; Values=@('blue', 'red', 'green')}
    
    New-AzEventGridSubscription `
      -ResourceId $topicid `
      -EventSubscriptionName <event_subscription_name> `
      -Endpoint $endpointURL `
      -ExpirationDate $expDate `
      -AdvancedFilter @($AdvFilter1)
    
    $htbody = @{
        id= $eventID
        eventType="recordInserted"
        subject="myapp/vehicles/cars"
        eventTime= $eventDate
        data= @{
            model="SUV"
            color="green"
        }
        dataVersion="1.0"
    }