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

[RFC] Add SpooledMessageBusMiddleware #48

Closed
wants to merge 1 commit into from
Closed

[RFC] Add SpooledMessageBusMiddleware #48

wants to merge 1 commit into from

Conversation

kbond
Copy link

@kbond kbond commented Nov 26, 2015

I have a requirement in a Symfony app for all the events to be handled on the kernel.terminate/console.terminate events. I came up with this middleware and thought I would share.

If this is something you would like to include, I can write tests/docs.

@matthiasnoback
Copy link

Hi @kbond! Thanks for brining this up.
There have been some other initiatives for finding ways to dispatch events in different ways. I must say that handling events right-away instead of waiting until the user "has left the building" makes more sense to me - that way you can even give some visual feedback to them if you like. If you're going to postpone event handling, then I'd suggest you do it using a message queue of some sorts. That way you can monitor failures more easily and also retry failed messages, instead of only seeing them turn up in the log files as errors.

@kbond
Copy link
Author

kbond commented Nov 27, 2015

Yeah, I admit I am sort of creating a queue-"lite". Some of my event handlers take a second or so to be handled but I didn't want the complexity of a full queue.

Anyway, I do understand and in fact I expected your response :)

@kbond kbond closed this Nov 27, 2015
@matthiasnoback
Copy link

Hehe @kbond I'm glad to see you know me that well :) Anyway, I've heard about some good experiences with Beanstalk, which may be useful in this case.

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