Azure service bus

Azure service bus actions can send a message to an Azure service bus.

Configuration

Azure service bus actions can connect to an Azure service bus using a connection string, a destination type and the destination.

Destination type

Azure service bus actions support 2 types of destinations:

  • Queue
  • Topic

Request headers

Note

The following restrictions are in place for the headers and values collections:

  • Headers: 64 KB
  • Values: 256 KB

If either collection exceeds the threshold, the request will not be executed and the failed attempt will be recorded in the Action audit log.

Azure service bus actions allow users to add headers to their request. Message headers can have dynamic values pulled from the trigger context. When a create/update is triggered, the context contains the entity's property values and relation identifiers. When a delete is triggered, the context is empty.

The syntax for context variables is the same as for display templates (e.g. placing {Title} in the value field pulls the value of the entity's Title property. When using a relation name, the value will contain the target entity's identifier.

In both cases, when multiple values are available, the | character is used as a separator. When using a self relation, the resolved value has the following format: <parent values separated with '|'>;<child values separated with '|'>.

It is also possible to add message body values. The syntax is the same as for headers and will result in placing the defined values into a property called context inside the message body.

Sample payload for a save action:

RequestResponseshell
{
  "context": {
      "Title": "asset title"
  },
  "saveEntityMessage": {
    "EventType": "EntityUpdated",
    "IsNew": false,
    "TargetDefinition": "M.Asset",
    "TargetId": 10063,
    "TargetIdentifier": "DCQVyfb87kuL4RwvoYCIrA",
    "TimeStamp": "2019-03-05T14:30:47.9681811Z",
    "UserId": 6,
    "Version": 40,
    "ChangeSet": {
      "PropertyChanges": [
        {
          "Culture": "(Default)",
          "Property": "Title",
          "Type": "System.String",
          "OriginalValue": "sample value",
          "NewValue": "another sample value"
        }
      ],
      "Cultures": [
        "(Default)"
      ],
      "RelationChanges": []
    }
  }
}

Test connection

After configuring the Azure service bus, users can test their connection via the User Interface by clicking the Test connection button. A HEAD request is sent to check if the endpoint is active.

Do you have some feedback for us?

If you have suggestions for improving this article,