Message Consumer

The Messaging Consumer is an object which can send text messages to a Queue or Topic destination in the built-in Message Broker. This version is backed by the full fledged messaging broker Apache ActiveMQ.

Version 3.x

Basic Usage

1
2
var consumer = require('messaging/v3/consumer');
consumer.queue("queue1").receive(1000);

Definition

Functions


Function Description Returns
queue() Returns an object representing a Message Queue Queue
topic() Returns an object representing a Message Topic Topic

Objects


Queue

Function Description Returns
receive(timeout) Receives a message from this Message Queue if any or null with the given timeout string

Topic

Function Description Returns
receive(timeout) Receives a message from this Message Topic if any or null with the given timeout string

Compatibility

Rhino Nashorn V8
βœ… βœ… βœ…
Edit