There isn’t a direct equivalent to the EventGridTrigger attribute for Azure Functions.
You can use the pull delivery model to consume events from the Namespace Topic. With pull delivery, your application connects to Event Grid to read CloudEvents using queue-like semantics. This allows you to consume events at your own pace, scale, or an ingress rate your application supports.
Reference: https://learn.microsoft.com/en-us/azure/event-grid/pull-delivery-overview
ps.: Please mark it as an accepted answer if the answer helped you.