2

I'm trying to connect an Event Grid to an Event Hub such that the hub sends events to the grid but I can't figure out how to do it within the portal. Is this possible?

I thought that I created the subscription but it seems like it might be going on the other direction (the hub listening to the grid). I can see the hub message going growing when I trigger a Function, but nothing seems to make it into the grid or my Function that should be listening to the grid.

Lots of things in the Azure portal seem to have a way to create a grid subscription, including the grid itself, but it's difficult to tell when you create one what direction things are going in... I haven't found any docs that describe doing this, only using Capture, which I don't want to do.

Josh
  • 6,944
  • 8
  • 41
  • 64

4 Answers4

0

you have to choice a Subscriber Type for Event Subscription. Note, that the Web Hook is the default type, see the following screen snippet:

enter image description here

Roman Kiss
  • 7,925
  • 1
  • 8
  • 21
  • This is what I did, but it didn't seem to work, no messages went through. – Josh Feb 14 '18 at 14:52
  • This answer is wrong, this is a subscription, it will send events from EventGrid to Event Hub, and the question asks for sending events from the Hub to the Grid. – Diego Mendes Mar 11 '18 at 13:34
  • @DiegoMendes, You are correct. I have been confused with the topic of the question. All publishers (sources of interest) are built-in the azure entities (presently 7 types) such as Event Hubs, Blob Storage, etc. The special case is only for the custom topic endpoints. – Roman Kiss Mar 11 '18 at 14:18
0

It looks like you are looking for other types of events other than CaptureFileCreated. Currently, "Microsoft.EventHub.CaptureFileCreated" is the only type of event published by Event Hub to Event Grid.(https://learn.microsoft.com/en-us/azure/event-grid/event-schema-event-hubs).

  • Ah, this is what I was worried about, so it can only be done via Capture currently. Thanks for the link. – Josh Feb 14 '18 at 12:41
0

Don't think this is possible as yet, the event grid seems to listen for the capture event of an event hub. So will only acknowlege at the time interval, or the blob file size limit by yourself for event capture.

I have created a separate .netcore event consumer service for real time processing of events, and used event grid subscribed to file capture to undertake my manual indexing of events so i can easily find in future on key entity properties, customer id; order id; invoice number etc...

Be interested to know if there is a way to react to event hub events immediately using event grid though!

CheGuevarasBeret
  • 1,364
  • 2
  • 14
  • 33
-1

You can create an event grid event subscription to your event hub namespace by following the below steps.

1.Login to azure portal.

2.Select All services.

3.Select Event Grid Subscriptions.

4.From the topic type select Event Hub Namespaces.

5.Select your subscription,resource group and required Event Hub Namespace.

6.Select you endpoint.

7.On clicking create, an event grid subscription for your event hub namespace will be created.

enter image description here

Ranjith Eswaran
  • 333
  • 2
  • 12