{"repo":"ballerina-platform/module-ballerinax-nats","free":true,"listed":false,"github":"https://github.com/ballerina-platform/module-ballerinax-nats","clone":"git clone https://github.com/ballerina-platform/module-ballerinax-nats.git","description":"Ballerina NATS Module.","language":"Ballerina","stars":119,"topics":["messaging","nats","ballerina"],"license":"Apache-2.0","category":"chat-messaging","readme_excerpt":"Ballerina NATS Library =================== This library provides the capability to send and receive messages by connecting to the NATS server. NATS messaging enables the communication of data that is segmented into messages among computer applications and services. Data is encoded and framed as a message and sent by a publisher. The message is received, decoded, and processed by one or more subscribers. NATS makes it easy for programs to communicate across different environments, languages, cloud providers, and on-premise systems. Clients connect to the NATS system usually via a single URL and then subscribe or publish messages to a subject. Basic usage Set up the connection First, you need to set up the connection with the NATS Basic server. The following ways can be used to connect to a NATS Basic server. 1. Connect to a server using the default URL: 2. Connect to a server using the URL: 3. Connect to one or more servers with custom configurations: Publish messages Publish messages to the NATS basic server Once connected, publishing is accomplished via one of the three methods below. 1. Publish with the subject and the message content: 2. Publish as a request that expects a reply: 3. Publish messages with a replyTo subject: Listen to incoming messages Listen to messages from a NATS server 1. Listen to incoming messages with the onMessage remote method: 2. Listen to incoming messages and reply directly with the onRequest remote method: Advanced usage Set up TLS The Ballerina","default_branch":null,"files":null,"tree":[],"storefront":"/r/ballerina-platform","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ballerina-platform/module-ballerinax-nats/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}