Azure Event Grid Plugin
The plugin provides functionality to interact with Event Grid
Installation
-
Copy the below line to
dependencies
section of the projectbuild.gradle
filePlease make sure to use the same version for all VIVIDUS dependencies. Example 1. build.gradleimplementation(group: 'org.vividus', name: 'vividus-plugin-azure-event-grid', version: '0.6.4')
-
If the project was imported to the IDE before adding new dependency, re-generate the configuration files for the used IDE and then refresh the project in the used IDE.
Interaction with topics
Topics configuration
Topics are configured with a set of properties with the following format:
azure.event-grid.{topic-name}.{property-name}=property value
Where:
-
topic-name
- The name of the topic which will be used as a step parameter -
property-name
- The name of the topic property. One of:-
key
- The topic access key -
event-schema
- The kind of schema (GRID, CLOUD or CUSTOM) -
endpoint
- The topic endpoint
-
Steps
Publish event
Publishes an event to a topic
When I send event to `$topicName` topic with payload:$payload
-
$topicName
- The name of the topic, will be used to find required properties values -
$payload
- The JSON payload to send to a topic
When I send event to `create-user` topic with payload:
{
"id": "1807",
"eventType": "RegisterVehicle",
"subject": "myapp/vehicles/motorcycles",
"eventTime": "2017-08-10T21:03:07+00:00",
"data": {
"make": "Ducati",
"model": "Monster"
},
"dataVersion": "1.0"
}