Processor
Table of Contents
Constants
- ACK = 'enqueue.ack'
- Use this constant when the message is processed successfully and the message could be removed from the queue.
- REJECT = 'enqueue.reject'
- Use this constant when the message is not valid or could not be processed The message is removed from the queue.
- REQUEUE = 'enqueue.requeue'
- Use this constant when the message is not valid or could not be processed right now, but we can try again later The original message is removed from the queue but a copy is published to the queue again.
Methods
- process() : string|object
- The method has to return either self::ACK, self::REJECT, self::REQUEUE string.
Constants
ACK
Use this constant when the message is processed successfully and the message could be removed from the queue.
public
mixed
ACK
= 'enqueue.ack'
REJECT
Use this constant when the message is not valid or could not be processed The message is removed from the queue.
public
mixed
REJECT
= 'enqueue.reject'
REQUEUE
Use this constant when the message is not valid or could not be processed right now, but we can try again later The original message is removed from the queue but a copy is published to the queue again.
public
mixed
REQUEUE
= 'enqueue.requeue'
Methods
process()
The method has to return either self::ACK, self::REJECT, self::REQUEUE string.
public
process(Message $message) : string|object
The method also can return an object. It must implement __toString method and the method must return one of the constants from above.
Parameters
- $message : Message
-
// * @param Context $context // removed - It's not clear why it's here
Return values
string|object —with __toString method implemented