Returnes message into the queue and makes it available for all subscribers to receive it again. This method is usually used to return a message which could not be processed at the moment to repeat the attempt. Messages that cause unrecoverable errors shall be removed permanently or/and send to dead letter queue.
a message to return.
(optional) callback function that receives an error or null for success.
Listens for incoming messages without blocking the current thread.
(optional) transaction id to trace execution through call chain.
a receiver to receive incoming messages.
Abstract method that will contain the logic for closing a component, disconnecting it from other services, and disposing resources.
unique business transaction id to trace calls across components.
the function to call when the closing process is complete. It will be called with an error if one is raised.
Permanently removes a message from the queue. This method is usually used to remove the message after successful processing.
a message to remove.
(optional) callback function that receives an error or null for success.
Ends listening for incoming messages. When this method is call listen unblocks the thread and execution continues.
(optional) transaction id to trace execution through call chain.
Gets the queue capabilities
the queue's capabilities object.
Gets the queue name
the queue name.
Abstract method that will contain the logic for checking whether or not a component has been opened.
true if the component has been opened and false otherwise.
Listens for incoming messages and blocks the current thread until queue is closed.
(optional) transaction id to trace execution through call chain.
a receiver to receive incoming messages.
Permanently removes a message from the queue and sends it to dead letter queue.
a message to be removed.
(optional) callback function that receives an error or null for success.
Abstract method that will contain the logic for opening a component and establishing connections to other services.
unique business transaction id to trace calls across components.
the function to call when the opening process is complete. It will be called with an error if one is raised.
Peeks a single incoming message from the queue without removing it. If there are no messages available in the queue it returns null.
(optional) transaction id to trace execution through call chain.
callback function that receives a message or error.
Peeks multiple incoming messages from the queue without removing them. If there are no messages available in the queue it returns an empty list.
(optional) transaction id to trace execution through call chain.
a maximum number of messages to peek.
callback function that receives a list with messages or error.
Reads the current number of messages in the queue to be delivered.
callback function that receives number of messages or error.
Receives an incoming message and removes it from the queue.
(optional) transaction id to trace execution through call chain.
a timeout in milliseconds to wait for a message to come.
callback function that receives a message or error.
Renews a lock on a message that makes it invisible from other receivers in the queue. This method is usually used to extend the message processing time.
a message to extend its lock.
a locking timeout in milliseconds.
(optional) callback function that receives an error or null for success.
Sends a message into the queue.
(optional) transaction id to trace execution through call chain.
a message envelop to be sent.
(optional) callback function that receives error or null for success.
Sends an object into the queue. Before sending the object is converted into JSON string and wrapped in a [[MessageEnvelop]].
(optional) transaction id to trace execution through call chain.
a message type
an object value to be sent
(optional) callback function that receives error or null for success.
Generated using TypeDoc
Interface for asynchronous message queues.
Not all queues may implement all the methods. Attempt to call non-supported method will result in NotImplemented exception. To verify if specific method is supported consult with MessagingCapabilities.
[[MessageEnvelop]]
MessagingCapabilities