Googleアナリティクス

2017年9月7日木曜日

Use Event Grid Publish with LogicApps

Original Post is here.

A connector to send events to EventGrid has been added, so I tried to issue an event from LogicFlow. I also thought about releasing EcentGrid, but I actually feel that it will be possible to summarize events very easily when I try it.

When you receive an event from EventGrid, you can use it without doing anything in particular, but you need to prepare it before you publish the event.

Create EventGrid Topics

image

Select "Event Grid Topic" from the Azure portal and set a new event publisher (publisher). Currently only Western 2 in the United States and the Midwest of the United States are available, but it will take time to develop in each region.

image

When you create Event Grid Topics, the detail screen is displayed. Here, the information of LogicApps is already displayed at the bottom of the screen, but nothing is displayed here in the newly created state. Here, when setting for sending events by LogicFlow etc. is done, it is displayed as a list of event occurrence sources. As we have not tried it only from LogicApps, the timing to display is unknown, but probably I think that if you call it even once it will be registered.

Note that "end point URL" and "access key" in the information displayed here are necessary for connection from LogicFlow, so copy it.

Setting of sending side LogicFlow

When using Event Grid Publish on the LogicFlow side, the information that needs to be input is as follows.

image

For the connection name, set Endpoint URL of Event Grid Topic you created for EndPoint and Key (1 or 2) of Event Grid Topic for Shared Access Signature and click Create.

image

It is this feeling that can be set on the designer. Event Grid Official Document, set the value as follows.

  • subject:(string)Target path of the event defined by the publisher.
  • eventType:(string)One of the types of events registered for this event source.
  • eventTime:(string)Time the event was generated based on the UTC time of the provider.
  • id:(string)Unique identifier for the event.
  • data:(object)Event data specific to the resource provider.

EventTIme not included in the previous screenshot is included in the advanced option. It is also possible to set the value directly with JSON.

image

Clicking the icon next to Data / Body switches the input mode.

Event sender has completed the setting.

Setting of receiving side LogicFlow

image

On the other hand, event reception is set up by setting the Resource Type as Microsoft.EventGrid.topics in the Event Grid trigger setting and setting it to be the Event Grid Topic with Resource Name created .

Some advanced options also have filtering conditions for events to be received, so if you actually want to use it, you will need to use this area and adjustments will be made so that only the necessary events will occur.

image

In this way, you can receive events sent using Event Grid Publish.

Very easy event collaboration using Event Grid was done. Since I tried it with LogicApps alone this time, it may be hard to attach an image as to how it can be used, but I am thinking as follows.

  • Coordinate service events that can be detected by LogicFlow in unison with Event Grid
  • Part to be sent to the Event Grid is freed to the outside with the HTTP Request connector, and the events of the service not provided in LogicFlow are also integrated.

Event Grid itself is also a premise to use from outside LogicApps, but there are certainly scenarios in which it is hard to implement (such as an external service out of reach) to be called directly by various services.

In such a case, it is very easy to construct so that LogicApps will detect and transmit events by putting LogicApps in between. If it is possible to make HTTP calls by various services, it means that it can be integrated into the Event Grid as an event alone. In addition, it also leads to the fact that there is no need to write and develop programs there.

It is very easy to integrate events even between services, so I really would like you to use it by all means.

0 件のコメント:

コメントを投稿