     successSub = bus.subscribe {
       channel: replyTo.channel
       topic: replyTo.topic.success
-    }
-    successSub.subscribe (message, envelope) ->
-      # Stop listening for errors by detaching the error callback
-      errSub.unsubscribe()
-
-      # Actually call the callback
-      callback message, envelope
-
-    # The success callback should only fire once, if at all
-    successSub.once()
-
-    bus.publish
-      channel: channel
-      topic: "request.#{topicId}"
-      data: data
-      replyTo: replyTo
+      callback: callback
+    }
 
 
   delegate: (channel, data, done) ->

        topic: replyTo.topic.err
        data: err

    timeoutId = timers.setTimeout onTimeout, timeout

    # Default callback is of signature (message, envelope).
    # Wrap so we can pass a conventional (err, result)-style callback.
    callback = (message, envelope) ->
      # Either an error or a success response has been
      # received, so cancel our timeout callback.
      timers.clearTimeout timeoutId

      {topic} = envelope
      [condition, middle..., topicId] = topic.split('.')
      switch condition
        when 'err'
          err = message
          done err
        when 'success'
          done null, message
        else
          # This should never be reached, as this callback should only
          # be invoked by a subscription to a topic of the form
          # 'err.<uuid>' or 'success.<uuid>'.
          err = new Error "Invalid condition '#{condition}'for response with topicId '#{topicId}'"
          done err

    # Subscribe to the 'err' response for topicId
    # We don't pass a callback immediately so that we can
    # refer to the subscription itself in the callback.
    errSub = bus.subscribe {
      channel: replyTo.channel,
      topic: replyTo.topic.err,
    }
    errSub.subscribe callback

    # Subscribe to the 'success' response for topicId
    # As above, we don't pass a callback immediately so that

  # just send the message
  send: (channel, data) ->
    topicId = uuid.v1()
    replyTo =
      channel: channel
      topicId: topicId
      topic:
        err: "err.#{topicId}"
        info: "info.#{topicId}"
        success: "success.#{topicId}"

    timers.setImmediate ->
      topic = "request.#{topicId}"
      bus.publish
        channel: channel
        topic: topic
        data: data
        replyTo: replyTo

    return replyTo

  # just listen
  listen: (channel, callback) ->
    sub = bus.subscribe
      channel: channel
      topic: '#'
      callback: callback

  # for sending interrupts
  signal: (channel, data) ->
