1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 3x 3x 1x 2x | // A queue that filters messages in the exchange export class Queue { constructor(exchange, filterFunc) { this.exchange = exchange; this.filterFunc = filterFunc; } // Returns the full ReQL query for this queue fullQuery() { return this.exchange.fullQuery(this.filterFunc); } // Subscribe to messages from this queue's subscriptions subscribe(iterFunc) { return this.exchange.subscribe(this.filterFunc, iterFunc); } } |