tynd

Documentation

Here you will find some topics related to using our service. Please note that you may also need to learn more about Disque itself or its client libraries in order to get a full understanding of the different use cases.

Connecting to the server

Most client libraries accept a list of nodes and optionally a password, and then proceed to connect to one of those nodes. Our application provides two environment variables on Heroku: the variable TYND_DISQUE_NODES contains a comma-separated list of nodes, and TYND_DISQUE_AUTH contains the cluster-wide password.

Connecting from Node.js

Using disque.js:

  var disque = require('disque.js');

  var NODES = process.env.TYND_DISQUE_NODES;
  var AUTH  = process.env.TYND_DISQUE_AUTH;

  var client = disque.connect(NODES, {auth: AUTH});

Connecting from Ruby

Using disque-rb:

  require "disque"

  NODES = ENV.fetch("TYND_DISQUE_NODES")
  AUTH  = ENV.fetch("TYND_DISQUE_AUTH")

  client = Disque.new(NODES, auth: AUTH)

Reading the environment variables

Access to the environment variables in Heroku is possible with the command line tool:

  $ heroku config:get TYND_DISQUE_NODES

  $ heroku config:get TYND_DISQUE_AUTH

Troubleshooting

Traffic is restricted to servers running on AWS EC2, and that means you can't connect to your Disque cluster from your local environment. Instead, you can use the Heroku console to interact with your cluster. Keep in mind that we are on call if you need our help.

Any questions?

Feel free to send us your questions to info@tynd.co.