brainlag / JavaNSQClient

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

Refactor nsqcommand #32

Closed esiqveland closed 7 years ago

esiqveland commented 7 years ago

Preparing for some further additions to flow control (RDY count in this NSQ client).

This PR does:

  1. refactor NSQCommand to constructor methods and cleans up some error handling of creating commands.
  2. Make it harder to create invalid commands by providing creator functions.
  3. DefaultNSQLookup: accept an ObjectMapper
    • The recommended way to use ObjectMapper is to have a shared instance in your application.