Sqs
extends AbstractAdapter
in package
SQS adapter class
Tags
Table of Contents
Properties
- $client : SqsClient|null
- SQS client
- $groupId : string
- Message group ID
- $priority : string
- Queue type
- $queueUrl : string|null
- Queue URL
Methods
- __construct() : mixed
- Constructor
- clear() : Sqs
- Clear jobs out of queue
- clearFailed() : Sqs
- Clear failed jobs out of the queue
- client() : SqsClient|null
- Get SQS client (alias)
- create() : Sqs
- Create SQS adapter
- getClient() : SqsClient|null
- Get SQS client
- getEnd() : int
- Get queue end index
- getFailedJob() : mixed
- Get failed job
- getFailedJobs() : array<string|int, mixed>
- Get adapter failed jobs
- getGroupId() : string
- Get queue group ID
- getPriority() : string
- Get queue priority
- getQueueUrl() : string
- Get queue URL
- getStart() : int
- Get queue start index
- getStatus() : int
- Get queue job status
- hasFailedJob() : bool
- Check if adapter has failed job
- hasFailedJobs() : bool
- Check if adapter has failed jobs
- hasJobs() : bool
- Check if adapter has jobs
- isFifo() : bool
- Is FIFO
- isFilo() : bool
- Is FILO
- isLifo() : bool
- Is LIFO (alias to FILO)
- isLilo() : bool
- Is LILO (alias to FIFO)
- pop() : AbstractJob|null
- Pop job off of queue
- push() : Sqs
- Push job on to queue
- setPriority() : AbstractAdapter
- Set queue priority
Properties
$client
SQS client
protected
SqsClient|null
$client
= null
$groupId
Message group ID
protected
string
$groupId
= 'pop-queue'
$priority
Queue type
protected
string
$priority
= 'FIFO'
$queueUrl
Queue URL
protected
string|null
$queueUrl
= null
Methods
__construct()
Constructor
public
__construct(SqsClient $client, string $queueUrl[, string $groupId = 'pop-queue' ]) : mixed
Parameters
- $client : SqsClient
- $queueUrl : string
- $groupId : string = 'pop-queue'
clear()
Clear jobs out of queue
public
clear() : Sqs
Return values
SqsclearFailed()
Clear failed jobs out of the queue
public
clearFailed() : Sqs
Return values
Sqsclient()
Get SQS client (alias)
public
client() : SqsClient|null
Return values
SqsClient|nullcreate()
Create SQS adapter
public
static create(SqsClient $client, string $queueUrl[, string $groupId = 'pop-queue' ]) : Sqs
Parameters
- $client : SqsClient
- $queueUrl : string
- $groupId : string = 'pop-queue'
Return values
SqsgetClient()
Get SQS client
public
getClient() : SqsClient|null
Return values
SqsClient|nullgetEnd()
Get queue end index
public
getEnd() : int
Return values
intgetFailedJob()
Get failed job
public
getFailedJob(mixed $index[, bool $unserialize = true ]) : mixed
Parameters
- $index : mixed
- $unserialize : bool = true
getFailedJobs()
Get adapter failed jobs
public
getFailedJobs([bool $unserialize = true ]) : array<string|int, mixed>
Parameters
- $unserialize : bool = true
Return values
array<string|int, mixed>getGroupId()
Get queue group ID
public
getGroupId() : string
Return values
stringgetPriority()
Get queue priority
public
getPriority() : string
Return values
stringgetQueueUrl()
Get queue URL
public
getQueueUrl() : string
Return values
stringgetStart()
Get queue start index
public
getStart() : int
Return values
intgetStatus()
Get queue job status
public
getStatus(int $index) : int
Parameters
- $index : int
Return values
inthasFailedJob()
Check if adapter has failed job
public
hasFailedJob(mixed $index) : bool
Parameters
- $index : mixed
Return values
boolhasFailedJobs()
Check if adapter has failed jobs
public
hasFailedJobs() : bool
Return values
boolhasJobs()
Check if adapter has jobs
public
hasJobs() : bool
Return values
boolisFifo()
Is FIFO
public
isFifo() : bool
Return values
boolisFilo()
Is FILO
public
isFilo() : bool
Return values
boolisLifo()
Is LIFO (alias to FILO)
public
isLifo() : bool
Return values
boolisLilo()
Is LILO (alias to FIFO)
public
isLilo() : bool
Return values
boolpop()
Pop job off of queue
public
pop() : AbstractJob|null
Return values
AbstractJob|nullpush()
Push job on to queue
public
push(AbstractJob $job) : Sqs
Parameters
- $job : AbstractJob
Return values
SqssetPriority()
Set queue priority
public
setPriority([string $priority = 'FIFO' ]) : AbstractAdapter
Parameters
- $priority : string = 'FIFO'