Pulsar notification plugin for the Linked Data Registry.
To build the project, run mvn clean package
.
This will produce a set of JAR files in the target
directory.
To install the plugin without dependencies, add the registry-pulsar-plugin-{version}.jar
JAR
to your LD registry deployment.
In Tomcat, you can do this by adding the JAR and any missing dependencies to the WEB-INF/lib
directory of the registry webapp.
The full set of dependencies can be found in the target/lib
directory after packaging.
To install the plugin with dependencies, add the registry-pulsar-plugin-{version}-jar-with-dependencies.jar
JAR
to the WEB-INF/lib
directory of the registry webapp.
Alternatively, you can create a new web app which extends the registry with the plugin functionality.
You should build the new WAR using a Maven project which has the registry-core
WAR, classes
and registry-pulsar-plugin
artifacts as dependencies.
See here for an example of such a project.
<dependency>
<groupId>com.github.ukgovld</groupId>
<artifactId>registry-core</artifactId>
<version>2.3.15</version>
<type>war</type>
</dependency>
<dependency>
<groupId>com.github.ukgovld</groupId>
<artifactId>registry-core</artifactId>
<version>2.3.15</version>
<classifier>classes</classifier>
</dependency>
<dependency>
<groupId>com.github.ukgovld</groupId>
<artifactId>registry-pulsar-plugin</artifactId>
<version>1.0.0</version>
</dependency>
The Pulsar plugin is configured by the registry's app.conf
configuration file.
The PulsarNotificationAgent
class implements the NotificationAgent
interface,
and can be supplied to the agent
property on the standard RegistryMonitor
instance defined in the configuration file,
in the same way as the registry's built-in notification agents.
See here for documentation on how to configure the standard monitoring and notification components.
You can configure the Pulsar connection by defining a ClientConfigurationData
instance in your app.conf
.
This must specify the serviceUrl
at least, but all of the properties listed in the Javadoc are supported.
To authenticate the registry client with your Pulsar server,
use the authPluginClassName
and authParams
properties.
The values of these properties will depend on your choice of authentication system.
Use these Java examples as a guide.
pulsarConfig = org.apache.pulsar.client.impl.conf.ClientConfigurationData
pulsarConfig.serviceUrl = pulsar://localhost:6650
pulsar = com.epimorphics.registry.notification.PulsarNotificationAgent
pulsar.config = $pulsarConfig
monitorConfig = com.epimorphics.registry.notification.MonitorRegister
monitorConfig.defaultTopic = ldregistry
monitor = com.epimorphics.registry.notification.RegistryMonitor
monitor.agent = $pulsar
monitor.config = $monitorConfig