Modify ThreadedConsumer to prevent consumer thread from exiting