CachedMessageQueue class abstract

Message queue that caches received messages in memory to allow peek operations that may not be supported by the undelying queue.

This queue is users as a base implementation for other queues

Inheritance

Constructors

CachedMessageQueue(String? name, MessagingCapabilities? capabilities)
Creates a new instance of the persistence component.

Properties

capabilities MessagingCapabilities
getter/setter pairinherited
connectionResolver ↔ ConnectionResolver
getter/setter pairinherited
counters ↔ CompositeCounters
getter/setter pairinherited
credentialResolver ↔ CredentialResolver
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
logger ↔ CompositeLogger
getter/setter pairinherited
name String
getter/setter pairinherited
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.
inherited
beginListen(String? correlationId, IMessageReceiver receiver) → void
Listens for incoming messages without blocking the current thread.
inherited
checkOpen(String? correlationId) → void
Checks if the queue has been opened and throws an exception is it's not.
inherited
clear(String? correlationId) Future<void>
Clears component state.
override
close(String? correlationId) Future
Closes component and frees used resources.
override
complete(MessageEnvelope message) Future
Permanently removes a message from the queue. This method is usually used to remove the message after successful processing.
inherited
configure(ConfigParams config) → void
Configures component by passing configuration parameters.
override
endListen(String? correlationId) → void
Ends listening for incoming messages. When this method is call listen unblocks the thread and execution continues.
override
getCapabilities() MessagingCapabilities
Gets the queue capabilities
inherited
getName() String
Gets the queue name
inherited
isOpen() bool
Checks if the component is opened.
inherited
listen(String? correlationId, IMessageReceiver receiver) → void
Listens for incoming messages and blocks the current thread until queue is closed.
override
moveToDeadLetter(MessageEnvelope message) Future
Permanently removes a message from the queue and sends it to dead letter queue.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
open(String? correlationId) Future
Opens the component.
override
openWithParams(String? correlationId, ConnectionParams? connection, CredentialParams? credential) Future
Opens the component with given connection and credential parameters.
inherited
peek(String? correlationId) 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.
override
peekBatch(String? correlationId, 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.
override
readMessageCount() Future<int>
Reads the current number of messages in the queue to be delivered.
override
receive(String? correlationId, int waitTimeout) Future<MessageEnvelope?>
Receives an incoming message and removes it from the queue.
override
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.
inherited
send(String? correlationId, MessageEnvelope envelope) Future
Sends a message into the queue.
inherited
sendAsObject(String? correlationId, String messageType, dynamic message) Future
Sends an object into the queue. Before sending the object is converted into JSON string and wrapped in a MessageEnvelope.
inherited
sendMessageToReceiver(IMessageReceiver? receiver, MessageEnvelope? message) Future
Sends a message to a receiver.
setReferences(IReferences references) → void
Sets references to dependent components.
inherited
subscribe(String? correlationId) Future
Subscribes to the message broker.
toString() String
Gets a string representation of the object.
inherited
unsubscribe(String? correlationId) Future
Unsubscribes from the message broker.

Operators

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