With https://github.com/DSpace/DSpace/pull/1824 we changed the order in which changes are written to the databases and Context.dispatchEvents() is called. The order is quite important if we commit changes to the database before we call the consumers, changes made by the consumers aren't stored as part of the transaction. We could fix this by letting consumers call context.commit(), but I think that this is a bad idea. A consumer reacts on events triggered by user interaction, cronjobs and further more. If you develop a consumer you cannot be sure about what happened before the event in the session. All you get is the information encapsulated in the Event object. This information is not enough to decide weather to commit or to rollback. Following a Consumer should never commit as this decision has to be done elsewhere in the code. Therefore I strongly suggest to change the order back to call dispatchEvents() before dbConnection.commit().
If we change the order back, we have to look deeper into the problem that let as change the order in the first place. I'll do this further down in the comments to this issue (and probably in follow up tickets).