Clears queue data in queue host application. Supposed to be an async function.
Safely destroys current queue, unregistered all set event listeners and connections. Supposed to be an async function.
Publishes data to current queue channel
If toName specified will publish to pubsub with different name. This can be used to implement broadcasting some messages to other subscribers on other pubsub channels. Different name should be in the same namespace (same imq prefix)
data to publish as channel message
Optional
toName: stringdifferent name of the pubsub to publish to
Sends a message to given queue name with the given data. Supposed to be an async function.
queue name to which message should be sent to
message data
Optional
delay: numberif specified, message will be handled in the target queue after specified period of time in milliseconds.
Optional
errorHandler: (err: Error) => voidcallback called only when internal error occurs during message send execution.
Starts the messaging queue. Supposed to be an async function.
Stops the queue (should stop handle queue messages). Supposed to be an async function.
Creates or uses subscription channel with the given name and sets message handler on data receive
channel name
Closes subscription channel
Generic messaging queue implementation interface
Example