Note event handling require to be careful as by default if the processing is too slow it will blacklist your handler.
There are usually 2 options:
1 - configure the event admin to ignore timeout for your package
* To configure go to http://<host>:<port>/system/console/configMgr
* Select "Apache Felix Event Admin Implementation"
* You should see a list for ignore timeout
2 - fork your code to be handler asynchronously so that it doesn't get blacklisted.