diff --git a/src/Pulsar.Client/Internal/DeadLetters.fs b/src/Pulsar.Client/Internal/DeadLetters.fs index e713de85..b4b3aa65 100644 --- a/src/Pulsar.Client/Internal/DeadLetters.fs +++ b/src/Pulsar.Client/Internal/DeadLetters.fs @@ -33,16 +33,16 @@ type internal DeadLetterProcessor<'T> let getOptionalKey (message: Message<'T>) = if String.IsNullOrEmpty(%message.Key) then - Some { PartitionKey = message.Key; IsBase64Encoded = message.HasBase64EncodedKey } - else None + else + Some { PartitionKey = message.Key; IsBase64Encoded = message.HasBase64EncodedKey } interface IDeadLetterProcessor<'T> with member this.ClearMessages() = store.Clear() member this.AddMessage (messageId, message) = - store.[messageId] <- message + store[messageId] <- message member this.RemoveMessage messageId = store.Remove(messageId) |> ignore @@ -69,16 +69,16 @@ type internal DeadLetterProcessor<'T> member this.ReconsumeLater (message, deliverAt, acknowledge) = let propertiesMap = Dictionary() for KeyValue(k, v) in message.Properties do - propertiesMap.[k] <- v + propertiesMap[k] <- v let mutable reconsumetimes = 1 match propertiesMap.TryGetValue(RetryMessageUtil.SYSTEM_PROPERTY_RECONSUMETIMES) with | true, v -> reconsumetimes <- v |> int |> (+) 1 | _ -> - propertiesMap.[RetryMessageUtil.SYSTEM_PROPERTY_REAL_TOPIC] <- topicName - propertiesMap.[RetryMessageUtil.SYSTEM_PROPERTY_ORIGIN_MESSAGE_ID] <- message.MessageId.ToString() - propertiesMap.[RetryMessageUtil.SYSTEM_PROPERTY_RECONSUMETIMES] <- string reconsumetimes - propertiesMap.[RetryMessageUtil.SYSTEM_PROPERTY_DELIVER_AT] <- deliverAt |> string + propertiesMap[RetryMessageUtil.SYSTEM_PROPERTY_REAL_TOPIC] <- topicName + propertiesMap[RetryMessageUtil.SYSTEM_PROPERTY_ORIGIN_MESSAGE_ID] <- message.MessageId.ToString() + propertiesMap[RetryMessageUtil.SYSTEM_PROPERTY_RECONSUMETIMES] <- string reconsumetimes + propertiesMap[RetryMessageUtil.SYSTEM_PROPERTY_DELIVER_AT] <- deliverAt |> string backgroundTask { if reconsumetimes > policy.MaxRedeliveryCount then let dlp = this :> IDeadLetterProcessor<'T> diff --git a/src/Pulsar.Client/Pulsar.Client.fsproj b/src/Pulsar.Client/Pulsar.Client.fsproj index dacc64d7..c21a648c 100644 --- a/src/Pulsar.Client/Pulsar.Client.fsproj +++ b/src/Pulsar.Client/Pulsar.Client.fsproj @@ -7,17 +7,17 @@ Pulsar.Client Pulsar.Client Pulsar.Client - 3.5.1 + 3.5.2 F# community .NET client library for Apache Pulsar https://github.com/fsprojects/pulsar-client-dotnet - Changed Snappy compression package + Fix for missing key in reconsumed message MIT https://github.com/fsprojects/pulsar-client-dotnet git pulsar F# community - 3.5.1 + 3.5.2 portable true README.md