Skip to content
Publisher-subscriber module to provide event-driven approach
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
src MODPUBSUB-1 - Create a new module "mod-pubsub" (#1) Jul 10, 2019
.gitignore MODPUBSUB-1 - Create a new module "mod-pubsub" (#1) Jul 10, 2019
Jenkinsfile Added Jenkinsfile Jul 11, 2019
LICENSE MODPUBSUB-1 - Create a new module "mod-pubsub" (#1) Jul 10, 2019 MODPUBSUB-1 - Create a new module "mod-pubsub" (#1) Jul 10, 2019


Copyright (C) 2019 The Open Library Foundation

This software is distributed under the terms of the Apache License, Version 2.0. See the file "LICENSE" for more information.


FOLIO publisher-subscriber module to provide event-driven approach. It is responsible for maintaining the registrations of event types and for coordinating distribution of events to the appropriate subscribers (modules).


   mvn install

See that it says "BUILD SUCCESS" near the end.


Build the docker container with:

   docker build -t mod-pubsub.

Test that it runs with:

   docker run -t -i -p 8081:8081 mod-pubsub

Installing the module

Follow the guide of Deploying Modules sections of the Okapi Guide and Reference, which describe the process in detail.

First of all you need a running Okapi instance. (Note that specifying an explicit 'okapiurl' might be needed.)

   cd .../okapi
   java -jar okapi-core/target/okapi-core-fat.jar dev

We need to declare the module to Okapi:

curl -w '\n' -X POST -D -   \
   -H "Content-type: application/json"   \
   -d @target/ModuleDescriptor.json \

That ModuleDescriptor tells Okapi what the module is called, what services it provides, and how to deploy it.

Deploying the module

Next we need to deploy the module. There is a deployment descriptor in target/DeploymentDescriptor.json. It tells Okapi to start the module on 'localhost'.

Deploy it via Okapi discovery:

curl -w '\n' -D - -s \
  -X POST \
  -H "Content-type: application/json" \
  -d @target/DeploymentDescriptor.json  \

Then we need to enable the module for the tenant:

curl -w '\n' -X POST -D -   \
    -H "Content-type: application/json"   \
    -d @target/TenantModuleDescriptor.json \

Issue tracker

See project MODPUBSUB at the FOLIO issue tracker.

You can’t perform that action at this time.