Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: SQS Observer Decorator #8

Open
Firtzberg opened this issue Mar 4, 2021 · 3 comments
Open

Feature Request: SQS Observer Decorator #8

Firtzberg opened this issue Mar 4, 2021 · 3 comments
Assignees

Comments

@Firtzberg
Copy link
Contributor

Firtzberg commented Mar 4, 2021

Many services have SQS observers. There are differences in the implementations across services, but what what we know for sure is that the SQS queue is polled, the worker processes all received messages one by one and deletes successfully processed messages.
What exactly happens with the obtained SQS message is an implementation detail of the worker, but there is a lot of logic which can be reused. I would like to see an SQS Observer decorator which will implement the existing WorkerInterface. The SQS Decorator will decorate a worker which in addition to the WorkerInterface has an additional setSqsMessage(array $sqsMessage) method.
There are more details, i.e. what to do if a message is malformed, logging, how does the worker reschedule which we can find the best solutions for and apply to existing and future SQS observers.

@Firtzberg Firtzberg self-assigned this Mar 4, 2021
@Firtzberg
Copy link
Contributor Author

The worker being provided the SQS Message also needs a unsetSqsMessage() method or alternatively the SQS observer decorator needs a worker factory or worker builder factory.

@Firtzberg
Copy link
Contributor Author

Firtzberg commented Mar 12, 2021

Make separate component.

@Firtzberg
Copy link
Contributor Author

Firtzberg commented Mar 16, 2021

If possible implement without depending on kojo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant