https://github.com/junip/actioncable-sqs
A demo rails app with action cable and SQS
https://github.com/junip/actioncable-sqs
action-cable amazon-sqs rails5 sqs sqs-actioncable
Last synced: 6 months ago
JSON representation
A demo rails app with action cable and SQS
- Host: GitHub
- URL: https://github.com/junip/actioncable-sqs
- Owner: junip
- Created: 2020-08-09T17:54:10.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-09T18:01:34.000Z (about 5 years ago)
- Last Synced: 2025-02-13T12:53:49.277Z (8 months ago)
- Topics: action-cable, amazon-sqs, rails5, sqs, sqs-actioncable
- Language: Ruby
- Homepage:
- Size: 146 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SQS-ActionCable-Integration
- Integration App with Action Cable and Amazon SQS.
- Added Shroyuken gem to send message to AMAZON SQS
- Listen Queue Message with Shroyuken Listener worker.
- Process Message and Send the message to Respective Channel.### Intialize
- Add Default Config for Shroyuken
```
Shoryuken.sqs_client_receive_message_opts = {
wait_time_seconds: 20,
max_number_of_messages: 10
}Shoryuken.add_group('default', 1) // this group related to SQS group id
Shoryuken.add_queue('your-queue-name', 1, 'default')
```- Setup QUEUE in your amazon account.
- Add the amazon credentials in .env
```
AWS_REGION=
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
```
- Listen on to receive message from SQS
```
bundle exec Shoryuken -r .app/jobs/sqs_listener.rb -R
```
- Run sidekiq
```
bundle exec sidekiq
```
- Update the queue name to send the message to SQS.
- Shoryuken.add_queue('your-queue-name', 1, 'default')
- Update the queue name to the `sqs-send.rb` file.- Start server `rails s`
- Open Browser console and run on port 3000
- Send Message to SQS```
SqsSend.new(your_message).send_message
```
- You will get the message in browser console.