nats-queue-0.1.2.2: Haskell API for NATS messaging system

Safe HaskellNone
LanguageHaskell2010

Network.Nats.Json

Synopsis

Documentation

subscribe Source #

Arguments

:: FromJSON a 
=> Nats 
-> String

Subject

-> Maybe String

Queue

-> (NatsSID -> String -> a -> Maybe String -> IO ())

Callback

-> IO NatsSID

SID of subscription

Subscribe to a channel, optionally specifying queue group If the JSON cannot be properly parsed, the message is ignored

publish Source #

Arguments

:: ToJSON a 
=> Nats 
-> String

Subject

-> a

Data

-> IO () 

Publish a message

requestMany Source #

Arguments

:: (ToJSON a, FromJSON b) 
=> Nats 
-> String

Subject

-> a

Body

-> Int

Timeout in microseconds

-> IO [b]