amqp-utils 0.2.1.4 → 0.2.1.5
raw patch · 2 files changed
+11/−3 lines, 2 filesdep ~amqp
Dependency ranges changed: amqp
Files
- amqp-utils.cabal +2/−2
- konsum.hs +9/−1
amqp-utils.cabal view
@@ -1,6 +1,6 @@ name: amqp-utils -version: 0.2.1.4+version: 0.2.1.5 synopsis: Generic Haskell AMQP Consumer @@ -41,7 +41,7 @@ bytestring, x509-system, tls,- amqp >=0.15+ amqp >=0.17 ghc-options: -threaded -Wall
konsum.hs view
@@ -49,6 +49,7 @@ printparam' "server" $ server args printparam' "port" $ show $ port args printparam' "vhost" $ vHost args+ printparam "connection_name" $ connectionName args globalCertificateStore <- getSystemCertificateStore let myTLS = TLSSettings (defaultParamsClient "" B.empty) { clientShared = def@@ -70,6 +71,7 @@ , coTLSSettings = if (tls args ) then Just ( TLSCustom myTLS ) else Nothing , coServers = [ (server args, fromIntegral $ port args) ] , coHeartbeatDelay = fmap fromIntegral $ heartBeat args+ , coName = fmap T.pack $ connectionName args } chan <- openChannel conn addChannelExceptionHandler chan@@ -105,7 +107,7 @@ printparam' "consumer tag" $ T.unpack ctag hr "entering main loop" - X.catch (forever $ threadDelay 1000000)+ X.catch (forever $ threadDelay 3600000000) (\exception -> printparam' "exception" $ show (exception :: X.SomeException)) closeConnection conn@@ -180,6 +182,7 @@ , heartBeat :: Maybe Int , tempDir :: Maybe String , additionalArgs :: [String]+ , connectionName :: Maybe String } instance Default Args where@@ -200,6 +203,7 @@ Nothing Nothing []+ Nothing callback :: String callback = "/usr/lib/haskell-amqp-utils/callback"@@ -278,6 +282,10 @@ }) "ARG") "additional argument for -X callback"+ , Option [ 'n' ]+ [ "name" ]+ (ReqArg (\s o -> o { connectionName = Just s }) "NAME")+ "connection name, will be shown in RabbitMQ web interface" ] usage :: String