Fixed potential NPE thrown in AbstractConsumer + some code improvements
Merge pull request #1 from kenshiro-o/npe_create_connection

Fixed potential NPE thrown in AbstractConsumer + some code improvements