Class: Queue

Defined in: src/modules/queue.coffee
Inherits: Core.Stateful

Overview

Provides a STOMP enabled RabbitMQ interface for publish and subscribe

Instance Method Summary

Constructor Details

# (void) constructor(user, password, host, port, protocol, vhost)

Construct a new Queue

Parameters:

  • user ( String ) — The username
  • password ( String ) — The password
  • host ( String ) — The hostname
  • port ( Integer ) — The port
  • protocol ( String ) — The protocol to use ws/http
  • vhost ( String ) — The vhost

Instance Method Details

# (void) connect()

Connect to the server

# (void) disconnect()

Disconnect from the server

# (void) subscribe(channel, fn)

Subscribe to a channel

Parameters:

  • channel ( String ) — The name of the channel
  • fn ( Function ) — The function to handle inbound messages

# (void) unsubscribe(channel, fn)

Unsubscribe from a channel

Parameters:

  • channel ( String ) — The name of the channel
  • fn ( Function ) — The specific handler to unsubscribe

# (void) publish(channel, payload)

Publish a message to a channel

Parameters:

  • channel ( String ) — The name of the channel
  • payload ( Object ) — The message payload

    Quickly fuzzy find classes, mixins, methods, file:

    Control the navigation frame:

    You can focus and blur the search input: