amqp 0.10.1 → 0.11
raw patch · 3 files changed
+27/−13 lines, 3 filesdep ~networkPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: network
API changes (from Hackage documentation)
+ Network.AMQP: msgApplicationID :: Message -> Maybe Text
+ Network.AMQP: msgClusterID :: Message -> Maybe Text
+ Network.AMQP: msgContentEncoding :: Message -> Maybe Text
+ Network.AMQP: msgExpiration :: Message -> Maybe Text
+ Network.AMQP: msgPriority :: Message -> Maybe Octet
+ Network.AMQP: msgType :: Message -> Maybe Text
+ Network.AMQP: msgUserID :: Message -> Maybe Text
- Network.AMQP: Message :: ByteString -> Maybe DeliveryMode -> Maybe Timestamp -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe FieldTable -> Message
+ Network.AMQP: Message :: ByteString -> Maybe DeliveryMode -> Maybe Timestamp -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Octet -> Maybe Text -> Maybe Text -> Maybe FieldTable -> Message
Files
- Network/AMQP.hs +8/−9
- Network/AMQP/Internal.hs +14/−2
- amqp.cabal +5/−2
Network/AMQP.hs view
@@ -327,7 +327,7 @@ -- | a 'Msg' with defaults set; you should override at least 'msgBody' newMsg :: Message -newMsg = Message (BL.empty) Nothing Nothing Nothing Nothing Nothing Nothing Nothing +newMsg = Message (BL.empty) Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing type ConsumerTag = Text @@ -395,22 +395,21 @@ mandatory -- mandatory; if true, the server might return the msg, which is currently not handled False) --immediate; not customizable, as it is currently not supported anymore by RabbitMQ - --TODO: add more of these to 'Message' (CHBasic (fmap ShortString $ msgContentType msg) - Nothing + (fmap ShortString $ msgContentEncoding msg) (msgHeaders msg) (fmap deliveryModeToInt $ msgDeliveryMode msg) -- delivery_mode - Nothing + (msgPriority msg) (fmap ShortString $ msgCorrelationID msg) (fmap ShortString $ msgReplyTo msg) - Nothing + (fmap ShortString $ msgExpiration msg) (fmap ShortString $ msgID msg) (msgTimestamp msg) - Nothing - Nothing - Nothing - Nothing + (fmap ShortString $ msgType msg) + (fmap ShortString $ msgUserID msg) + (fmap ShortString $ msgApplicationID msg) + (fmap ShortString $ msgClusterID msg) ) (msgBody msg)) return ()
Network/AMQP/Internal.hs view
@@ -49,9 +49,16 @@ msgDeliveryMode :: Maybe DeliveryMode, -- ^ see 'DeliveryMode' msgTimestamp :: Maybe Timestamp, -- ^ use in any way you like; this doesn't affect the way the message is handled msgID :: Maybe Text, -- ^ use in any way you like; this doesn't affect the way the message is handled + msgType :: Maybe Text, -- ^ use in any way you like; this doesn't affect the way the message is handled + msgUserID :: Maybe Text, + msgApplicationID :: Maybe Text, + msgClusterID :: Maybe Text, msgContentType :: Maybe Text, + msgContentEncoding :: Maybe Text, msgReplyTo :: Maybe Text, + msgPriority :: Maybe Octet, msgCorrelationID :: Maybe Text, + msgExpiration :: Maybe Text, msgHeaders :: Maybe FieldTable } deriving (Eq, Ord, Read, Show) @@ -450,12 +457,17 @@ } msgFromContentHeaderProperties :: ContentHeaderProperties -> BL.ByteString -> Message -msgFromContentHeaderProperties (CHBasic content_type _ headers delivery_mode _ correlation_id reply_to _ message_id timestamp _ _ _ _) body = +msgFromContentHeaderProperties (CHBasic content_type content_encoding headers delivery_mode priority correlation_id reply_to expiration message_id timestamp message_type user_id application_id cluster_id) body = let msgId = fromShortString message_id contentType = fromShortString content_type + contentEncoding = fromShortString content_encoding replyTo = fromShortString reply_to correlationID = fromShortString correlation_id - in Message body (fmap intToDeliveryMode delivery_mode) timestamp msgId contentType replyTo correlationID headers + messageType = fromShortString message_type + userId = fromShortString user_id + applicationId = fromShortString application_id + clusterId = fromShortString cluster_id + in Message body (fmap intToDeliveryMode delivery_mode) timestamp msgId messageType userId applicationId clusterId contentType contentEncoding replyTo priority correlationID (fromShortString expiration) headers where fromShortString (Just (ShortString s)) = Just s fromShortString _ = Nothing
amqp.cabal view
@@ -1,5 +1,5 @@ Name: amqp -Version: 0.10.1 +Version: 0.11 Synopsis: Client library for AMQP servers (currently only RabbitMQ) Description: Client library for AMQP servers (currently only RabbitMQ) . @@ -77,7 +77,6 @@ , binary >= 0.5 , containers>=0.2 , bytestring>=0.9 - , network>=2.2.3.1 , data-binary-ieee754>=0.4.2.1 , text>=0.11.2 , split>=0.2 @@ -86,3 +85,7 @@ , hspec-expectations >= 0.3.3 , connection == 0.2.* , vector + if flag(network-uri) + build-depends: network-uri >= 2.6, network > 2.6 + else + build-depends: network < 2.6