ActioncableNatsAdapter
Use this as a subscription adapter in Rails 6+ with NATs.
Installation
Add to your Gemfile:
bundle add actioncable_nats_adapter
TODO: publish action_cable_nats to rubygems.org
Usage
Set the config/cable.yaml
adapter to nats.
Example:
development:
adapter: nats
url: "nats://127.0.0.1:4222"
test:
adapter: test
production:
adapter: nats
channel_prefix: natscable_production
url: <%= ENV.fetch("NATS_URL") { "nats://127.0.0.1:4222" } %>