{"repo":"nats-io/nats-pure.rb","free":true,"listed":false,"github":"https://github.com/nats-io/nats-pure.rb","clone":"git clone https://github.com/nats-io/nats-pure.rb.git","description":"Ruby client for NATS, the cloud native messaging system.","language":"Ruby","stars":163,"topics":["ruby","nats","messaging","ruby-client","client"],"license":"Apache-2.0","category":"chat-messaging","readme_excerpt":"NATS: Pure Ruby Client A thread safe Ruby client for the NATS messaging system written in pure Ruby. Getting Started Basic Usage JetStream Usage Introduced in v2.0.0 series, the client can now publish and receive messages from JetStream. Service API The service API allows you to easily build NATS services. Clustered Usage TLS It is possible to setup a custom TLS connection to NATS by passing an OpenSSL context to the client to be used on connect: WebSocket Since NATS Server v2.2 it is possible to connect to a NATS server using WebSocket. 1. Add a websocket gem to your Gemfile: 2. Connect to WebSocket-enabled NATS Server using ws or wss protocol in URLs (for plain and secure connection respectively): 3. Use NATS as usual. NKEYS and JWT User Credentials This requires server with version = 2.0.0 Starting from v0.6.0 release of the client, you can also optionally install NKEYS in order to use the new NATS v2.0 auth features: NATS servers have a new security and authentication mechanism to authenticate with user credentials and NKEYS. A single file containing the JWT and NKEYS to authenticate against a NATS v2 server can be set with the user credentials option: This will create two callback handlers to present the user JWT and sign the nonce challenge from the server. The core client library never has direct access to your private key and simply performs the callback for signing the server challenge. The library will load and wipe and clear the objects it uses for each connect or ","default_branch":null,"files":null,"tree":[],"storefront":"/r/nats-io","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/nats-io/nats-pure.rb/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."}