add a transaction around event receiving