-
Notifications
You must be signed in to change notification settings - Fork 129
Open
Description
When a AWS SQS Message is fetched from a MessageQueue and is not "acknowledged" that it has been processed, it is considered to be "in flight".
To determine the number of "in flight" Messages on a MessageQueue, the GetQueueAttributes()
action can be used, which also provides access to other usefull information about the MessageQueue.
The current Driver::info()
could/should be used for this?
As implementation something like this can be done for the SQS Driver:
//SqsDriver.php
public function info(string $queueName = null): array
{
$queueAttributes = [
'prefetch' => $this->prefetch,
];
if(is_string($queueName)){
$queueUrl = $this->resolveUrl($queueName);
$result = $this->sqs->getQueueAttributes([
'AttributeNames' => ['All'],
'QueueUrl' => $queueUrl,
]);
$queueAttributes += $result['Attributes'] ?? [];
}
return $queueAttributes;
}
//AbstractQueue.php
public function info(){
return []; //empty array for now
}
//PersistentQueue.php
public function info(){
return $this->driver->info($this->name);
}
Would support for such a method something to be adopted in Bernard, or is it too technology-specific?
Metadata
Metadata
Assignees
Labels
No labels