Back to all resources
Outbound Events Outbound Events Json

Azure Service Bus Outbound Events / Signal - Capture

Create an Outbound Events configuration with a Azure Service Bus provider.

Azure Service Bus Outbound Events / Signal - Capture

Steps to create the Outbound Events configuration in a project with an Azure Service Bus subscription.

Use case

One Outbound Events configuration can be set per project.

The configuration will send events to the defined providers through the designated routes each time a modification is made in the stipulated IKG section.

In this use case, a configuration is created to send a message each time an upsert or a delete action is executed on any node with a Car label and a property manufacturer with value pontiac.

To know the supported filters, go to the Terraform plugin registry:

See more details

ikg

Requirements

- ServiceAccount credentials created in the IndyKite Hub for your organization.

- AppAgent credentials created in the IndyKite Hub, using the REST endpoints or using Terraform for your Project / Application.

- A topic and a topic subscription on an Azure Service Bus namespace.

Steps

1. Have a topic and a topic subscription on an Azure Service Bus namespace ready.

2. Create an Outbound Events configuration with indykite.audit.capture.* eventType and key pairs in a route for an Azure Service Bus provider.

3. Ingest data with some node with a Car label and a property manufacturer with value pontiac, in the IndyKite platform through the hub or the REST endpoint.

4. Add other nodes with a Car label and a property manufacturer with value pontiac.

5. Check that messages are received in the topic each time an upsert or a delete action is executed on any node with a Car label and a property manufacturer with value pontiac.

6. Check that events related to nodes with other properties are not sent to the topic.

Step 2

Create an EventSink configuration.

POST https://eu.api.indykite.com/configs/v1/event-sinksJson
{
  "project_id": "your_project_gid",
  "description": "description of eventsink",
  "display_name": "eventsink name",
  "name": "eventsink-name",
  "providers": {
    "provider-with-azure-service-bus": {
      "azure_service_bus": {
        "queueOrTopicName": "test-queue",
        "connectionString": "Endpoint=sb://ik-test.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=a...."
      }
    }
  },
  "routes": [
    {
      "provider_id": "provider-with-azure-service-bus",
      "event_type_key_values_filter": {
        "context_key_value": [
          {
            "key": "manufacturer",
            "value": "pontiac"
          },
          {
            "key": "captureLabel",
            "value": "Car"
          }
        ],
        "event_type": "indykite.audit.capture.upsert.node"
      },
      "stop_processing": true,
      "display_name": "Configuration Audit Events"
    }
  ]
}

Step 3

Ingest the nodes needed for this use case.

POST https://eu.api.indykite.com/capture/v1/nodes/
{
  "nodes": [
    {
      "external_id": "alice",
      "is_identity": true,
      "type": "Person",
      "properties": [
        {
          "type": "email",
          "value": "alice@email.com"
        },
        {
          "type": "given_name",
          "value": "Alice"
        },
        {
          "type": "last_name",
          "value": "Smith"
        }
      ]
    },
    {
      "external_id": "knightrider",
      "type": "Person",
      "is_identity": true,
      "properties": [
        {
          "type": "email",
          "value": "knightrider@demo.com"
        },
        {
          "type": "name",
          "value": "Michael Knight"
        }
      ]
    },
    {
      "external_id": "satchmo",
      "type": "Person",
      "is_identity": true,
      "properties": [
        {
          "type": "email",
          "value": "satchmo@demo.com"
        },
        {
          "type": "name",
          "value": "Louis Armstrong"
        }
      ]
    },
    {
      "external_id": "karel",
      "type": "Person",
      "is_identity": true,
      "properties": [
        {
          "type": "email",
          "value": "karel@demo.com"
        },
        {
          "type": "name",
          "value": "Karel Plihal"
        }
      ]
    },
    {
      "external_id": "kitt",
      "type": "Car",
      "is_identity": false,
      "properties": [
        {
          "type": "manufacturer",
          "value": "pontiac"
        },
        {
          "type": "model",
          "value": "Firebird"
        }
      ]
    },
    {
      "external_id": "cadillacv16",
      "type": "Car",
      "is_identity": false,
      "properties": [
        {
          "type": "manufacturer",
          "value": "Cadillac"
        },
        {
          "type": "model",
          "value": "V-16"
        }
      ]
    },
    {
      "external_id": "harmonika",
      "type": "Bus",
      "is_identity": false,
      "properties": [
        {
          "type": "manufacturer",
          "value": "Ikarus"
        },
        {
          "type": "model",
          "value": "280"
        }
      ]
    },
    {
      "external_id": "listek",
      "type": "Ticket",
      "is_identity": false
    },
    {
      "external_id": "airbook-xyz",
      "type": "Laptop",
      "is_identity": false
    }
  ]
}

Step 4

Ingest the nodes needed for this use case.

POST https://eu.api.indykite.com/capture/v1/nodes/
{
  "nodes": [
    {
      "external_id": "kitten",
      "type": "Car",
      "is_identity": false,
      "properties": [
        {
          "type": "manufacturer",
          "value": "pontiac"
        },
        {
          "type": "model",
          "value": "Bonneville"
        }
      ]
    },
    {
      "external_id": "kitty",
      "type": "Car",
      "is_identity": false,
      "properties": [
        {
          "type": "manufacturer",
          "value": "pontiac"
        },
        {
          "type": "model",
          "value": "Catalina"
        }
      ]
    }
  ]
}

ikg