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

Notification to application when redis server is down #39

Closed
kelaneren opened this issue Sep 14, 2012 · 8 comments
Closed

Notification to application when redis server is down #39

kelaneren opened this issue Sep 14, 2012 · 8 comments
Assignees

Comments

@kelaneren
Copy link

When redis server is down, PubSub throws RedisConnectionException which crashes Consumer. There is no way for application to handle it, trigger recovery or do something. A graceful handling could be considered there, like listener for application so that application can do something.

@debasishg
Copy link
Owner

Thanks for the feedback. Let me consider some strategy ..

@ghost ghost assigned debasishg Sep 14, 2012
@kelaneren
Copy link
Author

Currently I am doing a quick fix. I add a message type E and a try-catch in Consumer run method. If an exception is caught there, fn (the callback function) will send message type E through the callback function. With this change, I only need add E in callback along with S, U, M to deal with redis-server exceptional case. If this solution sounds good to you, I could send you my patch. Also looking forward to hearing better solution

@debasishg
Copy link
Owner

Your solution sounds good to me. Will u pls send me a pull request w/ the impl and (preferably) a test case ?

@kelaneren
Copy link
Author

I have sent my pull request. I checked test folder but I am not clear how the current tests are written. need more time to get more familiar with test source code. Therefore I only added my impl and updated PubSubSpec.

@debasishg
Copy link
Owner

Thanks a ton. I will do the necessary merge to incorporate the pull request.

@debasishg
Copy link
Owner

BTW I see you included changes in project.properties & project file also as part of the pull request. Possibly they were specific to your fork ?

@kelaneren
Copy link
Author

yes, I am new to github and don't know how to exclude that commit in pull request. please ignore that commit. sorry about it.

@debasishg
Copy link
Owner

cool .. I will do a manual merge .. Thanks for the pull request ..

debasishg added a commit that referenced this issue Sep 19, 2012
…to handle error by consumer when redis server gives an error
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