/module-ballerinax-nats

Ballerina NATS Module.

Primary LanguageJavaApache License 2.0Apache-2.0

Ballerina NATS Library

Build Trivy GitHub Last Commit codecov

The nats library is one of the standard library modules of the Ballerina language.

For more information on the operations supported by the module, which include the below, go to the nats module.

  • Point to point communication (Queues)
  • Pub/Sub (Topics)
  • Request/Reply

For example demonstrations of the usage, go to Ballerina By Examples.

Issues and Projects

Issues and Projects tabs are disabled for this repository as this is part of the Ballerina Standard Library. To report bugs, request new features, start new discussions, view project boards, etc. please visit Ballerina Standard Library parent repository.

This repository only contains the source code for the module.

Building from the Source

Setting Up the Prerequisites

  • Download and install Java SE Development Kit (JDK) version 11 (from one of the following locations).

    • Oracle

    • OpenJDK

      Note: Set the JAVA_HOME environment variable to the path name of the directory into which you installed JDK.

  1. Download and install Docker as follows. (The NATS library is tested with a docker-based integration test environment. The before suite initializes the docker container before executing the tests).

    • Installing Docker on Linux

      Note: These commands retrieve content from the get.docker.com website in a quiet output-document mode and installs it.

       wget -qO- https://get.docker.com/ | sh
      
    • For instructions on installing Docker on Mac, go to Get Started with Docker for Mac.

    • For information on installing Docker on Windows, goo to Get Started with Docker for Windows.

Building the Source

Execute the commands below to build from source.

  1. To build the library:

    ./gradlew clean build
    
  2. To run the integration tests:

    ./gradlew clean test
    
  3. To build the module without the tests:

    ./gradlew clean build -x test
    
  4. To debug package implementation:

    ./gradlew clean build -Pdebug=<port>
    
  5. To debug the module with Ballerina language:

    ./gradlew clean build -PbalJavaDebug=<port>
    
  6. Publish ZIP artifact to the local .m2 repository:

    ./gradlew clean build publishToMavenLocal
    
  7. Publish the generated artifacts to the local Ballerina central repository:

    ./gradlew clean build -PpublishToLocalCentral=true
    
  8. Publish the generated artifacts to the Ballerina central repository:

    ./gradlew clean build -PpublishToCentral=true
    

Contributing to Ballerina

As an open source project, Ballerina welcomes contributions from the community.

For more information, go to the contribution guidelines.

Code of Conduct

All contributors are encouraged to read the Ballerina Code of Conduct.

Useful Links