Page History
Audit Event store tenant configuration
Since Audit Consumer 4.2 the audit consumer supports a multi-tenant event store. Enabling multi-tenancy means that properties for listening to audit events messages and storing these audit event messages to a database can be configured for each tenant. For the audit event store only the properties url, username, password and JNDI are multi-tenant. JNDI is only required when a JNDI setup is used. Below are examples of how to configure a multi-tenant setup for the audit consumer.
Tenant configuration
Code Block | ||||
---|---|---|---|---|
| ||||
# Audit event store blueriq: audit: consumer: datasource: audit-sql-store: driver-class-name: <driver-class> validation-query: <validation-query> testWhileIdle: true timeBetweenEvictionRunsMillis: 5000 tenants: Apple: url: <url> username: <username> password: <password> Google: url: <url> username: <username> password: <password> # RabbitMQ blueriq: audit: consumer: rabbitmq: tenants: Apple host: --- port: --- virtualHost: --- username: --- password: --- ssl: enabled: --- queueNames: --- errorExchange: --- Google: host: --- port: --- virtualHost: --- username: --- password: --- ssl: enabled: --- queueNames: --- errorExchange: --- |
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:
Code Block | ||||
---|---|---|---|---|
| ||||
blueriq: audit: consumer: datasource: audit-sql-store: tenants: Apple: jndi-name: java:jboss/datasources/Apple Google: jndi-name: java:jboss/datasources/Google |
Be aware that if one tenant uses JNDI, all tenants should use JNDI.
Overview
Content Tools