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

Installation

The audit consumer can be installed using the Runtime zip. After unpacking the Runtime zip, the audit consumer can be found in the Services\blueriq-audit-consumer folder. The audit consumer is runnable by executing the jar file with java.

Alternatively, you can install the audit consumer on of the supported platforms of Blueriq. The supported platforms for the audit consumer match the ones for the Runtime. The installation procedure also resembles the ones for the Runtime, basically it is deploying the WAR, configure a config location and the suitable JDBC driver. See Installing Runtime for details on each specific platform.

Although it is possible to deploy the Audit Consumer in the same JVM as the Blueriq Runtime, we recommend, at least for acceptance and production environments, to deploy it on its own JVM or depending on the throughput of the application, on its own server.

System requirements

Minimal

2 CPU cores
256 MB Heap

2 CPU cores
512 MB Heap

Table of contents

Configuration

The audit consumer is required by the Audit component, so when this component is used the following needs to be configured first.

External config location

For supplying configuration from an external location you need to configure the spring.config.additional-location for the application. See the Config location section for your application platform on the page Installing Runtime

Create database

Scripts to create the required database content are provided for the following databases:

  • SQL Server
  • Oracle
  • H2 (we do not recommend using a H2 database in production environments)

Use the appropriate scripts to create the tables on your database. The database scripts can be found in the Blueriq Runtime zip, in the Services\audit-consumer\blueriq-audit-consumer-event-store.zip file.

Datasource configuration

For the audit consumer to work, a datasource needs to be configured in application.yml. This file is placed in the location the configuration folder where you install the audit consumer.

datasource
blueriq:
  audit:
    consumer:
      datasource:
        audit-sql-store:           
			url: <url>
        	username: <username>
        	password: <password>
        	driver-class-name: org.h2.Driver
        	validation-query: SELECT 1
        	testWhileIdle: true
        	timeBetweenEvictionRunsMillis: 5000
spring:
	jpa:
		database-platform: org.hibernate.dialect.H2Dialect
		show-sql: false
	 	hibernate:
			ddl-auto: validate
    	properties:
			hibernate:
				id:
					new_generator_mappings: true
			 	use_nationalized_character_data: true

We recommend setting a validation query so that when a database connection is lost due to a network failure for instance, it can be recovered once the network is restored. The validation query is database specific, the query below works with SQL Server (and H2), for Oracle use SELECT 1 FROM DUAL. For more information on configuring datasources, see How to configure BasicDataSource Configuration Parameters.

For additional datasource configuration please see the #DATASOURCE section in the Spring property documentation

JNDI

If you would like to use JNDI to configure your datasource, replace the blueriq.audit.consumer.datasource section in the application.yml described above with the following:

datasource
blueriq:
  audit:
    consumer:
      datasource:
        audit-sql-store:               
			jndi-name: java:jboss/datasources/auditConsumerSqlStoreJndiName

Database drivers

Depending on the underlying database, a specific driver needs to be installed on the application server as described on Configuring JDBC database drivers.

RabbitMQ configuration

For the audit consumer to work, rabbit mq needs to be configured in blueriq-audit-consumer.yml. This file is placed in the location the configuration folder where you install the audit consumer.

rabbitmq
blueriq:
  audit:
    consumer:
      rabbitmq:
        host: ---
        port: ---
        virtualHost: ---
        username: ---
        password: ---
        ssl:
          enabled: ---
        queueNames: ---
		errorExchange: ---		

The configured queue should be bound to the exchange where the Audit component writes its messages to.

  • No labels