PostgresBroker class

Properties

defaultVisibilityTimeout Duration
final
hashCode int
The hash code for this object.
no setterinherited
pollInterval Duration
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
supportsDelayed bool
Whether this broker supports delayed message delivery.
no setter
supportsPriority bool
Whether this broker supports message priorities.
no setter

Methods

ack(Delivery delivery) Future<void>
Acknowledges the delivery, confirming successful processing.
close() Future<void>
consume(RoutingSubscription subscription, {int prefetch = 1, String? consumerGroup, String? consumerName}) Stream<Delivery>
Returns a stream of deliveries based on the supplied subscription.
deadLetter(Delivery delivery, {String? reason, Map<String, Object?>? meta}) Future<void>
Sends the delivery to the dead letter queue.
extendLease(Delivery delivery, Duration by) Future<void>
Extends the lease for the delivery by the by duration.
getDeadLetter(String queue, String id) Future<DeadLetterEntry?>
Retrieves a single dead letter entry by envelope id, or null if not found.
inflightCount(String queue) Future<int?>
Returns the number of in-flight messages for queue, if supported.
listDeadLetters(String queue, {int limit = 50, int offset = 0}) Future<DeadLetterPage>
Lists dead letter queue entries for queue, returning up to limit results starting at offset. Entries are typically ordered from newest to oldest unless documented otherwise by the implementation.
nack(Delivery delivery, {bool requeue = true}) Future<void>
Negatively acknowledges the delivery.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pendingCount(String queue) Future<int?>
Returns the number of pending messages for queue, if supported.
publish(Envelope envelope, {RoutingInfo? routing}) Future<void>
Publishes the given envelope using routing metadata when provided.
purge(String queue) Future<void>
Removes all messages from the queue.
purgeDeadLetters(String queue, {DateTime? since, int? limit}) Future<int>
Removes dead letter entries from queue.
replayDeadLetters(String queue, {int limit = 50, DateTime? since, Duration? delay, bool dryRun = false}) Future<DeadLetterReplayResult>
Replays at most limit dead letter entries back onto the active queue.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

connect(String connectionString, {Duration defaultVisibilityTimeout = const Duration(seconds: 30), Duration pollInterval = const Duration(milliseconds: 500), String? applicationName, TlsConfig? tls}) Future<PostgresBroker>