relayrides/pushy — pull request #38 by jchambers (2014-01-04 17:35:54+00:00)
Title: Separate retry queue (fixes #20)

This change allows callers to specify their own queue for new notifications. The idea here is that callers can watch the contents of their queue to make decisions about when to enqueue new messages or take other actions (or potentially just use a bounded queue).

To facilitate the custom queue, there are a few large under-the-hood changes:

1. We now have a separate retry queue that's not exposed to the public at all. Pushy controls that queue exclusively, and will attempt to drain the retry queue before consuming new notifications from the "public" queue. This also means that callers are pretty much free to do what they want with the public queue.
2. `PushManager` construction now happens by way of a `PushManagerFactory`. It seemed like we had enough optional arguments that doing everything through a constructor was going to get hairy.

This should cover what's being asked for in #20.