DVPubSubQueueAdapter class

DV.Queues on Pub/Sub.

Pub/Sub separates the thing you publish to from the thing you read from: a topic fans out to any number of subscriptions, and a message is delivered to every one of them. A Dartvel queue is one topic and one subscription, named the same, because a queue that fanned out would run every job as many times as there were subscribers.

Like SQS it has no priority and no readable backlog, and like SQS this adapter refuses those rather than answering with an empty list.

Implemented types

Constructors

DVPubSubQueueAdapter(DVPubSubTransport transport, {required String project, String subscriptionSuffix = '-sub', Duration ackDeadline = const Duration(seconds: 30)})

Properties

ackDeadline → Duration
final
hashCode → int
The hash code for this object.
no setterinherited
project → String
The Google Cloud project these topics live in.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
subscriptionSuffix → String
How a queue's subscription is named from the queue.
final
transport → DVPubSubTransport
final

Methods

ackIdFor(String jobId) → String?
The ack id that will acknowledge jobId.
complete(String id) → Future<void>
override
deadLetters(String queue) → Future<List<DVJobEnvelope<DVJobPayload>>>
override
discard(String id) → Future<bool>
Drops one dead-lettered job. Flushing a queue to be rid of a single poison message would take every other job with it.
override
enqueue<TPayload>(String queue, TPayload payload, {int priority = 0, int maxAttempts = 3, Duration backoff = const Duration(seconds: 30), String? tenant}) → Future<DVJobEnvelope<TPayload>>
Stores payload on queue.
override
fail(String id, String error, StackTrace stackTrace) → Future<void>
override
flush(String queue) → Future<int>
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pending(String queue) → Future<List<DVJobEnvelope<DVJobPayload>>>
override
reserve(String queue) → Future<DVJobEnvelope<DVJobPayload>?>
override
retry(String id) → Future<bool>
override
subscriptionPath(String queue) → String
topicPath(String queue) → String
toString() → String
A string representation of this object.
inherited

Operators

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