Skip to content

[Messenger] DeduplicateMiddleware using Symfony Serializer #60659

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

Open
or-benjamin opened this issue Jun 3, 2025 · 2 comments
Open

[Messenger] DeduplicateMiddleware using Symfony Serializer #60659

or-benjamin opened this issue Jun 3, 2025 · 2 comments

Comments

@or-benjamin
Copy link

or-benjamin commented Jun 3, 2025

Symfony version(s) affected

7.3

Description

When using the symfony serializer component to save messages data in a database, the deserializer is not able to deserialize the DeduplicateStamp.

Error : Could not decode stamp: The type of the "key" attribute for class "Symfony\Component\Messenger\Stamp\DeduplicateStamp" must be one of "string" ("array" given).

How to reproduce

Reproduction Repo : https://github.com/or-benjamin/Symfony-Messenger-DeduplicateMiddleware-Bug

Possible Solution

No response

Additional Context

No response

@kbond
Copy link
Member

kbond commented Jun 3, 2025

I believe zenstruck/messenger-test#95 is related. Some lock stores prevent the key from being serialized. Actually, maybe not - I saw you're using symfony/serializer.

@stof
Copy link
Member

stof commented Jun 4, 2025

We need #60023 to be able to serialize a lock Key with the Symfony serializer in a working way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants