Liam is an integration between your (Ruby on Rails) App and SNS, SQS AWS Services. It allows sending a message to the AWS queue (SQS) and processes the topic name on other (Ruby on Rails) App.(microservices)
We called it Liam in honor to (Liam Neeson) for so many reasons!
Liam sends an important message to Marko from Tropoja
I DONT KNOW WHO YOU ARE, I DON’T KNOW WHAT YOU WANT, BUT I WILL FIND YOU AND I WILL KILL YOU...
We have a medium post Here where we improve communication between our (Ruby on Rails) apps and avoided create new endpoints in our apps. but What's happening when the App A needs data of App B and App B is down for a microsecond?
Welcome, Liam!
With Liam, We can send a message easily to SQS Service through SNS Service and process the message data through the consumer that Liam has
The first thing:
-
What's SNS Service? Amazon Simple Notification Service (SNS) Documentation
-
What's SQS Service? Amazon Simple Queue Service (SQS) Documentation
Add this line to your application's Gemfile:
gem 'liam', git: 'https://github.com/alexismansilla/liam.git'
$ bundle install
If you want the liam file in your rails app then execute:
$ bundle exec rails install:liam
We're going to create 2 Liam file
- /config/liam.yaml
- /lib/task/liam.rake
- Producer Message
message = { id: self.id, title: self.title, created_at: self.created_at }.to_json
topic_name = 'liam_CreateArticle'
Liam::Producer.message(topic: topic_name, message: message)
- Consumer Message
Liam::Consumer.message
TODO
TODO
Bug reports and pull requests are welcome on GitHub at https://github.com/alexismansilla/liam.