IMessageQueue class abstract interface

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.

See MessageEnvelope See MessagingCapabilities

Implementers

Constructors

IMessageQueue()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

abandon(MessageEnvelope message) Future
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.
beginListen(IContext? context, IMessageReceiver receiver) → void
Listens for incoming messages without blocking the current thread.
close(IContext? context) Future
Closes component and frees used resources.
inherited
complete(MessageEnvelope message) Future
Permanently removes a message from the queue. This method is usually used to remove the message after successful processing.
endListen(IContext? context) → void
Ends listening for incoming messages. When this method is call listen unblocks the thread and execution continues.
getCapabilities() MessagingCapabilities
Gets the queue capabilities
getName() String
Gets the queue name
isOpen() bool
Checks if the component is opened.
inherited
listen(IContext? context, IMessageReceiver receiver) → void
Listens for incoming messages and blocks the current thread until queue is closed.
moveToDeadLetter(MessageEnvelope message) Future
Permanently removes a message from the queue and sends it to dead letter queue.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
open(IContext? context) Future
Opens the component.
inherited
peek(IContext? context) Future<MessageEnvelope?>
Peeks a single incoming message from the queue without removing it. If there are no messages available in the queue it returns null.
peekBatch(IContext? context, int messageCount) Future<List<MessageEnvelope?>>
Peeks multiple incoming messages from the queue without removing them. If there are no messages available in the queue it returns an empty list.
readMessageCount() Future<int>
Reads the current number of messages in the queue to be delivered.
receive(IContext? context, int waitTimeout) Future<MessageEnvelope?>
Receives an incoming message and removes it from the queue.
renewLock(MessageEnvelope message, int lockTimeout) Future
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.
send(IContext? context, MessageEnvelope envelope) Future
Sends a message into the queue.
sendAsObject(IContext? context, String messageType, dynamic value) Future
Sends an object into the queue. Before sending the object is converted into JSON string and wrapped in a MessageEnvelope.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited