GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — StreamEntry (XREAD) does not support binary because it uses Map<String, String> · Issue #3566 · redis/jedis

StreamEntry (XREAD) does not support binary because it uses Map<String, String> #3566

New issue
Copy link
New issue
Copy link
Closed
#4152
Closed
StreamEntry (XREAD) does not support binary because it uses Map<String, String>#3566
#4152
Copy link
Labels
enhancementstatus: good-first-issueAn issue that can be worked on by brand new contributors
Milestone
6.1.0

Description

@raylau1234
raylau1234
opened on Oct 3, 2023
Issue body actions

StreamEntry uses a Map<String, String> for fields.

As a result, binary data which contains illegal utf-8 sequences get mangled.

Reproduce by using XADD with a key or value which contains an illegal utf-8 sequence like 0xc3 0x28.

Retrieve via XREAD.

Expected result -- API to get byte array instead of a String, which is lossy with illegal utf-8 sequences.

Activity

  1. sazzad16 commented on Oct 3, 2023

    @sazzad16
    sazzad16
    on Oct 3, 2023
    Contributor
    More actions

    First of all, what is XGET?

    Secondly, there are xrange(byte[] key, ...) methods. Don't these help?

  2. raylau1234 commented on Oct 3, 2023

    @raylau1234
    raylau1234
    on Oct 3, 2023
    Author
    More actions

    Sorry, I meant XREAD.

    You are correct on the alternate XRANGE signature. But I am really using XREAD. Let me update the title and to clarify.... XREAD only is problematic.

  3. raylau1234
    changed the title [-]StreamEntry (XRANGE / XGET) does not support binary because it uses Map<String, String>[/-] [+]StreamEntry (XREAD) does not support binary because it uses Map<String, String>[/+] on Oct 3, 2023
  4. raylau1234 commented on Oct 3, 2023

    @raylau1234
    raylau1234
    on Oct 3, 2023
    Author
    More actions

    I see there are alternate signatures for xread as well. Let me see of those help. I found the StreamEntry ones first. Give me a few minutes to explore and will udpate.

  5. raylau1234 commented on Oct 3, 2023

    @raylau1234
    raylau1234
    on Oct 3, 2023
    Author
    More actions

    OK, List<byte[]> xread(XReadParams, Entry<byte[], byte[]>... streams) is a possible workaround, but is cumbersome bec I need to deserialize the byte into the map of key / message id / values. i.e. I need to replicate everything that List<Map, Entry<String, List<StreamEntry>>> xread(XReadParams, Map<String, StreamEntryID>) is doing in terms of decoding with STREAM_READ_RESPONSE, STREAM_ENTRY_LIST, etc. (but skipping the SafeEncoder.encode() and keeping the binary there).

  6. sazzad16
    added
    status: good-first-issueAn issue that can be worked on by brand new contributors
    on Apr 4, 2024
  7. kmularise commented on Apr 7, 2025

    @kmularise
    kmularise
    on Apr 7, 2025
    More actions

    Hello, I noticed that there was a draft PR (#3803) opened for this issue quite a while ago, but it hasn’t been updated in some time.

    I’m interested in picking up this work and continuing from where it left off — possibly by improving the previous approach or starting fresh while keeping backward compatibility in mind.

    Would it be okay if I proceed with a new PR for this? Please let me know if there are any concerns or preferences before I begin

  8. thachlp commented on Apr 7, 2025

    @thachlp
    thachlp
    on Apr 7, 2025
    Contributor
    More actions

    @kmularise sure, please open the new pr for this issue, I will close mine 🙇

    Reacted by Yuijin Kim(yuikim)
  9. kmularise commented on Apr 7, 2025

    @kmularise
    kmularise
    on Apr 7, 2025
    More actions

    @thachlp Thanks for the clarification and for allowing others to pick this up.
    I’ll start working on a new PR for this issue. Appreciate the prior work done on #3803!

  10. YoHanKi
    added a commit that references this issue on Apr 27, 2025

    Add binary stream support for XREAD and XREADGROUP (redis#3566)

    e5829f1
  11. YoHanKi
    added 7 commits that reference this issue on May 8, 2025

    Add parameterized binary stream tests for RESP2/RESP3 in Jedis, Clust…

    c82cca9

    Switch to StreamEntryID in binary stream tests and add illegal UTF-8 …

    88a8ff4

    Add Map<byte[], StreamEntryID> support and binary stream tests (redis…

    24c5510

    Modify Map<byte[], StreamEntryID> support and binary stream tests (re…

    6fdcf85

    Add JedisByteMap implementation (redis#3566)

    5b54a64

    Add JedisByteMapTest (redis#3566)

    7ddf39c

    Changed Map<byte[], byte[]> in STREAM_ENTRY_BINARY_LIST to JedisByteH…

    246123d
  12. ggivo
    added a commit that references this issue on May 27, 2025

    Add binary stream support for XREAD and XREADGROUP (#3566) (#4152)

    33dd489
  13. ggivo
    linked a pull request that will close this issueAdd binary stream support for XREAD and XREADGROUP (#3566) #4152on May 27, 2025
  14. ggivo commented on May 27, 2025

    @ggivo
    ggivo
    on May 27, 2025
    Collaborator
    More actions

    Resolved with PR #4152

  15. ggivo
    closed this as completedon May 27, 2025
  16. ggivo
    added this to the 6.1.0 milestone on Aug 5, 2025
  17. ggivo
    added
    enhancement
    on Aug 5, 2025
  18. svc-squareup-copybara
    added a commit that references this issue on Aug 5, 2025

    This PR contains the following updates:

    c1791a4
  19. venkata-kishore
    added 2 commits that reference this issue on Dec 9, 2025

    V7.1.0 (#4)

    a56a62c

    V7.1.0 (#5)

    893c99c
  20. eizus
    added a commit that references this issue on Jul 18, 2026

    This PR contains the following updates:

    2368ae1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementstatus: good-first-issueAn issue that can be worked on by brand new contributors

    Type

    No type

    Projects

    No projects

      Milestone

      • 6.1.0

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.