You are viewing the documentation for Blueriq 16. Documentation for other versions is available in our documentation directory.

This page applies when the Blueriq Runtime is used and using the Customerdata service for Aggregate storage.

This feature is available from Customerdata Service version 2.0.0 and up.

Introduction

The Customerdata service has the ability to send events to a queue for every Create, Update and Delete action. This functionality enables you as a customer to have other systems in your architecture that can listen and react on these CUD events.

For example, a Business Intelligence tool that consumes the Aggregate events from the queue and uses the information in the event.

Another example is that you have a complex search component that consumes the Aggregate events from the queue into an index.


Overview: Blueriq Runtime with Customerdata service and Queue

*  In pink: third party tooling

The image overview displays the components needed to be able to use the publishing events functionality of the Customerdata service.

The Blueriq Runtime with the Customerdata service for the aggregate storage is already in place in case you are using Blueriq Aggregate functionality.

Enabling the functionality on the Customerdata service to publish aggregate events need a couple of things:

  • A queue to publish the events on 
  • A component that consumes events from the queue


Relevant documentation

Configure Customerdata service to publish Aggregate events

How to configure the Customerdata service for aggregate storage 

Information about Blueriq with Aggregates

Contents of the event

The event published to the queue contains three main fields.

Field nameDescription
eventType

Contains one of these three values:

CREATED, UPDATED, DELETED

data

Json representation of the Aggregate.

In case of 'eventType:DELETED'" this field only contains the aggregateId and version

entityType

Can only be one value at this moment:

Aggregate


The code below is an example of a 'Create' event.

event_example
{  
   "eventType":"CREATED",
   "data":{  
      "aggregateId":5,
      "applicationId":null,
      "createdByUserId":"elle.lamont",
      "createdByUserName":"Elle LaMont",
      "createdDate":1523610495912,
      "data":"<Aggregate/>",
      "lastUpdatedByUserId":null,
      "lastUpdatedByUserName":null,
      "lastUpdatedDate":1523610495912,
      "latestVersion":true,
      "metadata":[  
         {  
            "name":"age",
            "seqIndex":0,
            "type":"INT",
            "booleanValue":null,
            "currencyValue":null,
            "dateValue":null,
            "dateTimeValue":null,
            "integerValue":50,
            "numberValue":null,
            "percentageValue":null,
            "stringValue":null
         }
      ],
      "published":false,
      "type":"Testset-Library-Employee",
      "version":1
   },
   "entityType":"Aggregate"
}


Related pages