DataNotifyBroadcaster
(plugins.datanotifybroadcaster)
Overview
The datanotifybroadcaster
plugin enables real-time data synchronization across multiple Servoy server instances using AMQP (Advanced Message Queuing Protocol). It leverages RabbitMQ to broadcast database changes between servers, ensuring that all connected servers maintain consistent cached data.
This plugin automatically broadcasts notifications when data changes occur in one server instance, triggering cache invalidation in other servers. It handles connection recovery after network interruptions by flushing all affected datasources to ensure data consistency. The plugin also supports secure communication through TLS with configurable keystore settings and hostname verification.
Beyond database synchronization, the plugin provides a messaging infrastructure that allows applications to broadcast custom messages between server instances using the registerMessageBroadcastConsumer
method, enabling advanced inter-server communication scenarios.
Configuration is handled through server settings, with options for connection parameters, security settings, and timeout values. The plugin automatically creates the necessary AMQP exchanges and queues during initialization.
Configuration Properties:
amqpbroadcaster.hostname
: Set the hostname of the AMQP (RabbitMQ) server where to connect to (this is mandatory field)amqpbroadcaster.username
: Set the username of the AMQP (RabbitMQ) server where to connect to (default value is guest)amqpbroadcaster.password
: Set the password of the AMQP (RabbitMQ) server where to connect to (default value is guest)amqpbroadcaster.virtualhost
: Set the virtual host of the AMQP (RabbitMQ) server where to connect to (default value is / )amqpbroadcaster.port
: Set the port of the AMQP (RabbitMQ) server where to connect to (default value is 5671 for SSL connection and 5672 for default connection)amqpbroadcaster.exchange
: Set the exchange through which the databroadcast notifications are send (default value is databroadcast)amqpbroadcaster.routingkey
: Set the key for routing the databroadcast notifications (default to empty string)amqpbroadcaster.connectiontimeout
: Set the connection timeout of the AMQP (RabbitMQ) connection (default value 60000 - 60 seconds)amqpbroadcaster.handshaketimeout
: Set the handshake timeout of the AMQP (RabbitMQ) connection (default value 10000 - 10 seconds)amqpbroadcaster.shutdowntimeout
: Set the shutdown timeout of the AMQP (RabbitMQ) connection (default value 10000 - 10 seconds)amqpbroadcaster.rpctimeout
: Set the rpc continuation timeout of the AMQP (RabbitMQ) channel (default value 10 minutes)amqpbroadcaster.keystore.path
: The path on the system that points to a the keystore to enable TLS communication, a .JKS file will use the JKS keystore format, else it will use PKCS12 formatamqpbroadcaster.keystore.password
: The password to access/read the keystore and key of the amqpbroadcaster.keystore.pathamqpbroadcaster.tlsprotocols
: When set this will enabled TLS communication over the given protocol like TLSv1.2 or TLSv1.3. WARNING: Without a keystore this will not verify the certificates only enable tls communicationamqpbroadcaster.hostnameverification
: When set to true this will enable the hostname verification for the TLS conncetions (TLS must be enabled) (default false)
Last updated
Was this helpful?