Consumer

Last modified: Jun 7, 2019 @ 12:03

Contents

Introduction

Consumers are calls to systems outside of DDM that can be notified when a Rule has been triggered. There are several ways that the Consumer can be notified, either by defining an HTTP endpoint to be called, working with an Inbox/Outbox that supports occasionally connected consumers, email, SMS and more.

Create/Edit Consumer

  1. Navigate to Settings -> Event Settings -> Consumers tab.
  2. Select an existing Consumer or click +Create to create a new one. The Consumer page is displayed.
  3. In the Name field, enter a name for the Consumer.

Consumer behavior can be configured in two alternative ways:
Note: Once the behavior is configured and the Consumer saved, it is not possible to change it.

  1. Integrate with HTTP Post: If this switch is activated, an alert will be sent to the Endpoint (URL) when a Rule is triggered and an Event is generated. The Endpoint can be programmed in the receiving application to perform a given task, based on the alert. The Event remains in the system as an active Event until reset.
    The following settings are displayed:

    • Endpoint: Enter an endpoint for the HTTP POST. For information on the HTTP post body format, see HTTP Post Body Format.
    • Username and Password are for BASIC authentication and only necessary if the target server requires and supports it.
    • HTTP Headers: Click + Add to add HTTP headers, according to the requirement of the receiving application.
      Notes:

      • The Event Publisher (HTTP Client) accepts TLS connections when the target HTTP Consumer (HTTP Server) certificate is signed by a well-known global CA authority certificates. If the certificate is not signed by a well known CA, the TLS connection cannot be established, an exception/error occurs.
      • If the HTTP POST fails,  the alert is moved to the dead letter queue.
  2. Inbox Access Ticket: This behavior is selected if Integrate with HTTP Post is not activated.

    In this case, the settings Endpoint, Username, Password and HTTP Headers are not displayed.
    After saving the Consumer, you can re-open it to see the details of the Inbox and Outbox Access Tickets. In the Actions dropdown, it is also possible to download the tickets.

    The Inbox queue is used to store events and resets sent from DDM Core to Consumers, until the Consumer retrieves them.

    • The Inbox Access Ticket is used to retrieve events (notifications) and resets from the Inbox queue. This is done with REST operation DELETE with values read from the Inbox access ticket:
      DEL {Http Service URI}/{Http Service Path}/messages/head?timeout=10
      headers:
      "Authorization": "{Http SAS}"
    • To retrieve the Inbox and Outbox access tickets, in the Dashboard, navigate to Settings -> Event Settings -> Consumers tab, then select the desired Consumer. In Actions, select Download Tickets.
    • Outbox Access Ticket: The Outbox is used to queue messages sent from Consumer to DDM Core. The Outbox access ticket can be used for resetting active Events, with the following format:
      POST {Http Service URI}/{Http Service Path}/messages
      Headers:
         "Authorization": "{Http SAS}"
         "PayloadType": "EventReset"
         "Content-Type": "application/atom+xml;type=entry;charset=utf-8"
      Body:
      {
            "EventID": <active-event-ID>,
            "Message": <optional-message-to-send>
      }