brainlag / JavaNSQClient

Fast Java client for NSQ
MIT License
90 stars 57 forks source link

Use Executor instead of ExecutorService for simplier use #25

Closed wdroste closed 7 years ago

wdroste commented 8 years ago

This a minor issue at best.. but here's the reasoning for the pull-request.

I was using Spring Reactor/LMAX distributor to creates an Executor (not ExecutorService) for NSQConsumer however since it takes ExecutorService I needed to create a wrapper that basically throws UnsupportedOperation.. looking at the code NSQConsumer rightly only cares about executing a callback for each message, so it doesn't need the whole ExecutorService interface and could be supported by just the Executor.

brainlag commented 7 years ago

Cherry picked the first commit. Obviously we can't use the rest.