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

Safe HaskellNone
LanguageHaskell98

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