Actual code for processing subscriptions