Skip to content

Instantly share code, notes, and snippets.

@falsecz
Created March 26, 2014 16:49
Show Gist options
  • Save falsecz/9787813 to your computer and use it in GitHub Desktop.
Save falsecz/9787813 to your computer and use it in GitHub Desktop.
r = (require 'easy-amqp') 'amqp://guest:guest@localhost'
r.queue('fro', durable: yes, autoDelete: no).bind('#').subscribe (m) ->
console.log m
r.on 'error', (err) ->
console.log 'amqp', err
# je to trosku hack, ale funguje to
r.conn.on 'end', () ->
r.conn.reconnect()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment