Adding a callback to check if the item should be sent or not

This allows rate limiting implementations or other things outside
of the core lib. Fixes #92