Solace Plugin

This section explains how you can integrate Hazelcast's WAN replication with Solace messaging platform. With this integration, you can publish and consume WAN replication events to/from Solace appliances.

Solace, the most powerful global enterprise messaging solution, combines with Hazelcast, the fastest in-memory data grid, to drive efficiencies in the processing of global data workloads. This Solace-Hazelcast joint solution enables multi-cloud and hybrid-cloud replication of Hazelcast clusters for worldwide operation. It enables enterprise grade reliability, WAN scale-out and low latency cluster replication.

Enabling Integration

To publish and consume WAN replication events on Solace appliances, Hazelcast WAN replication has the following classes:

  • SolaceWanPublisher
  • SolaceWanConsumer

You can register these classes using the configuration elements <wan-publisher> and <wan-consumer> while configuring your WAN replication. SolaceWanPublisher and SolaceWanConsumer are included in the hazelcast-solace library which can be found in following Maven coordinates:

<dependency>
    <groupId>com.hazelcast</groupId>
    <artifactId>hazelcast-solace</artifactId>
    <version>1.0.0</version>
</dependency>

Please see the following sections for configuration details.

Configuring Publisher

Following is an example declarative configuration for the publisher side:

<wan-replication name="AtoB">
    <wan-publisher group-name="clusterB">
        <class-name>com.hazelcast.enterprise.wan.solace.SolaceWanPublisher</class-name>
        <properties>
			<property name="host">192.168.2.66</property>
			<property name="vpn.name">YOUR_VPN_NAME</property>
			<property name="username">admin</property>
			<property name="password">YOUR_PASSWORD</property>
			<property name="topic.base.name">BaseTopic</property>
			<property name="queue.name">Q/hz/clusterA</property>
			<property name="initial.queue.mapping.enabled">true</property>
		</properties>
    </wan-publisher>
</wan-replication>

Descriptions of the properties are as follows:

  • class-name: Full class name of Solace WAN publisher, i.e., com.hazelcast.enterprise.wan.solace.SolaceWanPublisher
  • host: IP address of the Solace host machine. It can be in the format "IP address:Port number". It is a mandatory property.
  • vpn.name: Name of the Solace VPN. It is an optional property.
  • username: Username for the Solace host. It is a mandatory property.
  • password: Password for the Solace host. It is an optional property.
  • topic.base.name: Base topic name to use while publishing events to Solace appliance. If not defined, the members will publish to topics using the format "T/hz/[cluster-group-name]/partitionId". If defined, the format "[topic.base.name]/partitionId" will be used. It is an optional property.
  • queue.name: Name of the queue to be used in topic-to-queue mapping. This property is only valid if the property initial.queue.mapping.enabled is set to "true". Default queue name is "Q/hz/[cluster-group-name].
  • initial.queue.mapping.enabled: Decides if a default topic-to-queue mapping should be performed on the publisher side. When enabled, it tries to provide a queue, whose name is defined by the property queue.name, and all topics that are generated by this instance is mapped to this queue. When disabled, you should perform this mapping manually. It is enabled by default.

Configuring Consumer

Following is an example declarative configuration for the consumer side:

<wan-replication name="AtoB">
    <wan-consumer>
        <class-name>com.hazelcast.enterprise.wan.solace.SolaceWanConsumer</class-name>
        <properties>
			<property name="host">192.168.2.66</property>
			<property name="vpn.name">YOUR_VPN_NAME</property>
			<property name="username">admin</property>
			<property name="password">YOUR_PASSWORD</property>
			<property name="queue.name">Q/hz/clusterA</property>
		</properties>
    </wan-consumer>
</wan-replication>

Descriptions of the properties are as follows:

  • class-name: Full class name of Solace WAN consumer, i.e., com.hazelcast.enterprise.wan.solace.SolaceWanConsumer
  • host: IP address of the Solace host machine. It can be in the format "IP address:Port number". It is a mandatory property.
  • vpn.name: Name of the Solace VPN. It is an optional property.
  • username: Username for the Solace host. It is a mandatory property.
  • password: Password for the Solace host. It is an optional property.
  • queue.name: Name of the queue to be polled by the consumer. It is a mandatory property.

Code Samples

You can find code samples at hazelcast-code-samples repository.

RELATED INFORMATION

You can download the white paper Hazelcast WAN Replication with Solace from Hazelcast.com.