-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
ReactiveHashCommands doesn't properly encode/decode Object value #34554
Comments
/cc @cescoffier (redis), @gsmet (redis), @machi1990 (redis) |
Maybe |
We just merged the support for custom codec. Can you try with a custom codec? |
Btw we plan to use Type instead of Class - the custom codec PR already did the switch. Later we will allow TypeReference. |
I checked the PR, I guess I can't use a custom codec because I want to store any object into Redis hash table:
|
Yes, this is what I want, I can pass Type to |
So, would passing a |
I think so, make |
return |
Doesn't that mean there can be only one codec? I can't have another codec, such as |
Yes, then it will be up to the order of the custom codecs. I agree it could be better. However, using type/type reference is going to take quite some time (I need to modify 300 classes) |
Verified latest main branch(commit 2da3206), it still breaks: Line 50 in ed8b789
For I still have to bypass with |
|
You will have to regiester a custom codec, otherwise yes, it will encode the basic types using the expected RESP encoding. |
As #34554 (comment) described, I can’t use custom codec for |
If you do not have a known type, you must handle the encoding yourself (using the json mapper). |
BTW, for such kind of generic usage, I would even recommend using the low-level client and not the type-safe data source. |
@cescoffier Could this be backported to 3.2.x ? or when will 3.3.x be released? I decided to use
|
Got a dirty way to save a little CPU and memory with custom codec in Quarkus main branch😄 Notice the
|
Could we have API like I wouldn't like to use low level |
Describe the bug
ReactiveHashCommands<String, String, Object>
uses Marshaller, this class encodes String into plain string without quotes, not JSON string, but decodes with Object.class.I have to use
ReactiveHashCommands<String, String, Object[]>
to bypass, any chance to makeReactiveHashCommands<String, String, Object>
just works?Quarkus version or git rev
3.1
The text was updated successfully, but these errors were encountered: