You are viewing the documentation for Blueriq 16. 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. In the documentation below, the <service> is audit, the <datasource-name> is audit-sql-store and the configuration YAML is application.yml.

Database

Scripts to create the required database content are provided for the supported databases.

For customers that are upgrading, if the database scheme was already created in a previous version, check to see if there are database upgrade scripts provided for any of the intermediate versions in the Upgrade Instructions.

Datasource configuration

The datasource needs to be configured in the configuration YAML file.

Configuration YAML
blueriq:
  <service>:
    datasource:
      <datasource-name>:
        url: <url>
        username: <username>
        password: <password>
        driver-class-name: <driver-class>
        validation-query: <validation-query>
        testWhileIdle: true
        timeBetweenEvictionRunsMillis: 5000

hibernate:
  dialect: <dialect>
  hbm2ddl:
    auto: validate
  id:
    new_generator_mappings: true
  show_sql: false
  use_nationalized_character_data: true

Example configuration

Below are configuration examples which contain a JDBC url, driver-class, validation query and dialect for each supported database.

Oracle
blueriq:
  <service>:
    datasource:
      <datasource-name>:
        url: jdbc:oracle:thin:@<host>:<port>/<servicename>
        username: <username>
        password: <password>
        driver-class-name: oracle.jdbc.driver.OracleDriver
        validation-query: SELECT 1 FROM DUAL
        testWhileIdle: true
        timeBetweenEvictionRunsMillis: 5000

hibernate:
  dialect: org.hibernate.dialect.OracleDialect
  hbm2ddl:
    auto: validate
  id:
    new_generator_mappings: true
  show_sql: false
  use_nationalized_character_data: true


SQL Server
blueriq:
  <service>:
    datasource:
      <datasource-name>:
        url: jdbc:sqlserver://<host>:<port>;databaseName=<database>;trustServerCertificate=true
        username: <username>
        password: <password>
        driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
        validation-query: SELECT 1
        testWhileIdle: true
        timeBetweenEvictionRunsMillis: 5000
 
hibernate:
  dialect: org.hibernate.dialect.SQLServer2012Dialect
  hbm2ddl:
    auto: validate
  id:
    new_generator_mappings: true
  show_sql: false
  use_nationalized_character_data: true


PostgreSQL
blueriq:
   <service>:
    datasource:
      <datasource-name>:
        url: jdbc:postgresql://<host>:<port>/<database>
        username: <username>
        password: <password>
        driver-class-name: org.postgresql.Driver
        validation-query: SELECT 1
        testWhileIdle: true
        timeBetweenEvictionRunsMillis: 5000
 
hibernate:
  dialect: org.hibernate.dialect.PostgreSQLDialect
  hbm2ddl:
    auto: validate
  id:
    new_generator_mappings: true
  show_sql: false
  use_nationalized_character_data: true

Database query timeout

To specify the database query timeout, set the defaultQueryTimeoutSeconds property in the datasource configuration.

If multi-tenancy enabled, when needed, the value has to be set for each datasource separately.

Without setting property, the default value is 60 seconds.

blueriq:
  <service>:
    datasource:
      <datasource-name>:
        ...
        defaultQueryTimeoutSeconds: 10


For additional datasource configuration please refer to the Spring property documentation.

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.

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

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: ---	
		# From blueriq version 16.9 it is possible to declare multiple hosts (RabbitMQ Cluster)
        addresses: localhost:30012,otherhost:25102               

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

  • No labels