Skip to content

opendevstack/ods-notifications

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Marketplace NATS.io backend

This is a component for a NATS.io (v2.11.x) backend, customized with reasonable defaults to deliver notifications to AppShell-based frontends via messaging.

NATS.io is a high-performance messaging system designed to connect applications and data across diverse environments.

Some out-of-the-box features are:

  • Message persistence via NATS.io streams
  • KV store and Object store
  • Optional exactly-once message delivery
  • Messaging patterns: publisher-subscriber, request-reply...

For a more detailed overview about NATS.io, see: NATS Concepts - Overview

Before using for the first time ⚠️

In order to deliver persistent notifications to an AppShell frontend, it is required configuring the NATS.io subjects and streams in the frontend to match the subjects and streams defined in the stream configurations.

See the HOWTO - Customization section for more details.

NATS.io CLI tools

To administer the NATS.io backend server, some CLI tools are provided out-of-the box when deploying this backend on an OpenShift cluster.

These tools are available on a nats-box OpenShift container, running along the nats container, both on the same OpenShift Pod workload.

Take a look at the official documentation for details:

HOWTO - Customization

Messaging persistence

A watchdog script will automatically create persistent streams, one for each *-stream-config.json file section on the helm template file nats-box-config-map.yaml.

To customize the existing streams, on the nats-box-config-map.yaml helm template file, edit the xxx-stream-config.json properties to your needs.

To add new streams, just add more xxx-stream-config.json properties to the nats-box-config-map.yaml helm template.

NOTE: The matching AppShell-based frontend may require being configured accordingly.

After a successful Openshift nats backend deployment, on the nats-box container:

  1. For every xxx-stream-config.json property, a stream json config file will be created automatically.
  2. For every config file matching the pattern: *-stream-config.json, a stream will be created on the nats server
  3. The name of the stream will be inferred from the config filename, e.g. my-stream-config.json -> my-stream
  4. The presence of these streams will be checked periodically, recreating them automatically if missing.

These tasks are executed periodically by a streams-watchdog.sh script, also present on the nats-box-config-map.yaml helm template.

Schedule tasks

In order to schedule periodic tasks, e.g. purge old data periodically, an easy way would be customizing the streams-watchdog.sh script on the nats-box-config-map.yaml helm template.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •