Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message Key Lost in Retry and DLQ #268

Open
xwwwx opened this issue Jul 15, 2024 · 1 comment
Open

Message Key Lost in Retry and DLQ #268

xwwwx opened this issue Jul 15, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@xwwwx
Copy link

xwwwx commented Jul 15, 2024

I noticed that after using ReconsumeLaterAsync, the messages that originally had a value for the key have an empty key when consumed again.

I found that the issue is mainly in the function getOptionalKey in the file src\Pulsar.Client\Internal\DeadLetters.fs. This function only sets the PartitionKey when message.Key is empty.

    let getOptionalKey (message: Message<'T>) =
            if String.IsNullOrEmpty(%message.Key) then
                Some { PartitionKey = message.Key; IsBase64Encoded =  message.HasBase64EncodedKey  }
            else
                None
@Lanayx
Copy link
Member

Lanayx commented Jul 15, 2024

Thanks for noticing! I've made a fix in 3.5.2, please verify

@Lanayx Lanayx added the bug Something isn't working label Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants