{"repo":"jgaskins/nats","free":true,"listed":false,"github":"https://github.com/jgaskins/nats","clone":"git clone https://github.com/jgaskins/nats.git","description":"NATS client in pure Crystal with JetStream support","language":"Crystal","stars":31,"topics":["nats","message-broker","message-bus","message-queue","messaging","microservices-architecture","microservices","cloud-native","jetstream","crystal"],"license":"MIT","category":"chat-messaging","readme_excerpt":"NATS NATS is a message broker for distributed systems. Installation 1. Add the dependency to your shard.yml : 2. Run shards install Usage You can use NATS in a publish/subscribe or request/reply paradigm. Publish/Subscribe For publish/subscribe, let's consider the following class to be shared, representing an event that will be published by one service and picked up by another: In one service, we can subscribe to a subject that will be sent all of the events pertaining to a user registering: And then to publish on those topics: Request/Reply Let's consider an orders service that we may want to send requests to. Define the request handler Sending the request Development TODO: Write development instructions here Contributing 1. Fork it ( ) 2. Create your feature branch ( git checkout -b my-new-feature ) 3. Commit your changes ( git commit -am 'Add some feature' ) 4. Push to the branch ( git push origin my-new-feature ) 5. Create a new Pull Request Contributors - Jamie Gaskins - creator and maintainer","default_branch":null,"files":null,"tree":[],"storefront":"/r/jgaskins","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jgaskins/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."}