Safe Haskell | None |
---|---|
Language | Haskell2010 |
This is the low level client connection to the nsqd. It is recommended to use the higher level library when those come out.
- defaultConfig :: String -> IO NSQConnection
- establish :: NSQConnection -> TQueue Message -> TQueue Command -> IO ()
Documentation
defaultConfig :: String -> IO NSQConnection Source
Attempt to come up with an intelligent default NSQConnection
default
by discovering your client's hostname and reusing it for the client id
for the IdentifyMetadata
establish :: NSQConnection -> TQueue Message -> TQueue Command -> IO () Source
Establish a session with the specified nsqd using the provided
TQueue
so that the actual data processing can be done in a decoupled
manner from the hsnsq stack.
This supports connecting to a specific nsqd, it is however recommended in the future when the feature comes out to user a higher layer that handles the load balancing between multiple nsqd.