Skip to content

Instantly share code, notes, and snippets.

@dyoder
Created February 4, 2012 02:49
Show Gist options
  • Save dyoder/1734704 to your computer and use it in GitHub Desktop.
Save dyoder/1734704 to your computer and use it in GitHub Desktop.
Scenario
subscribe: () ->
context = @context
spire = @context.spire
iteration = @context.iteration
spire.messages.subscribe "channel #{iteration}", {maxCallCount: 1},
(error,messages) ->
if error
context.error(error)
return
context.finish()
# TODO: verify content of messages
for message in messages
console.log message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment