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

Custom redis codecs are not registered when more than one Codec is implemented #35661

Closed
domkun opened this issue Aug 31, 2023 · 1 comment · Fixed by #35662
Closed

Custom redis codecs are not registered when more than one Codec is implemented #35661

domkun opened this issue Aug 31, 2023 · 1 comment · Fixed by #35662
Labels
area/redis kind/bug Something isn't working
Milestone

Comments

@domkun
Copy link
Contributor

domkun commented Aug 31, 2023

Describe the bug

According to the documentation of the redis-client extenstion, custom codecs can be registered, see https://quarkus.io/guides/redis-reference#custom-codec .

However when more than one bean implementing the Codec interface is present, no Codec is registered.

The problem seems to be the in the RedisClientRecorder class:

The codecs.isResolvable() checks if there is exactly one implementation of a Codec resolvable, so if more than one codec is resolvable no codec is registered.

Expected behavior

All custom codecs should be registered.

Actual behavior

If more than one bean implements the Codec interface, no custom codec is registered.

How to Reproduce?

Create two beans implementing the Codec interface and check if the codec is registered.

Output of uname -a or ver

No response

Output of java -version

17

GraalVM version (if different from Java)

No response

Quarkus version or git rev

3.3.1

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@domkun domkun added the kind/bug Something isn't working label Aug 31, 2023
@quarkus-bot
Copy link

quarkus-bot bot commented Aug 31, 2023

/cc @cescoffier (redis), @gsmet (redis), @machi1990 (redis)

@cescoffier cescoffier self-assigned this Aug 31, 2023
@cescoffier cescoffier removed their assignment Aug 31, 2023
@quarkus-bot quarkus-bot bot added this to the 3.4 - main milestone Sep 1, 2023
@gsmet gsmet modified the milestones: 3.4 - main, 3.3.2 Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redis kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants