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

Post PUT e RESERVE event #66

Closed
giosh94mhz opened this issue Jan 11, 2017 · 2 comments
Closed

Post PUT e RESERVE event #66

giosh94mhz opened this issue Jan 11, 2017 · 2 comments

Comments

@giosh94mhz
Copy link
Contributor

I've implemented in my project a proxy class, in order to edit the payload before is returned to the application. Wouldn't it better to have a post RESERVE command for that?

If so, PUT is the complementary command and deserve a post event too...

@armetiz
Copy link
Owner

armetiz commented Jan 11, 2017

Hi @giosh94mhz

Events are used to inform external components that an action occurred. Event interception should not change the original operation.

In my opinion; I prefer building a application object to manage input / output to the queueing system. This object could be responsible to edit the payload.

Also, note that I don't want to add complexity on this project which is just a Symfony wrapper of a queueing adapter.

@giosh94mhz
Copy link
Contributor Author

I know it's a simple bundle and I like it for that. The same reason for which I use beanstalkd. But I think it's a bit overwhelming to add behaviour by adding decorator (proxy) classes.

My use case is this: I create a SecuritySubscriber (not that secure, in fact), on PUT add an hash on RESERVE remove the hash, and if not valid replace all the payload with a "noop" token.

I don't think it adds much complexity, but feel free to close if you think it doesn't fit in the project.

@armetiz armetiz closed this as completed Mar 10, 2017
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

2 participants