Skip to content

feat(microservices): add return buffers option for binary data#16676

Open
Forceres wants to merge 2 commits intonestjs:masterfrom
Forceres:feat/client-redis-binary-format
Open

feat(microservices): add return buffers option for binary data#16676
Forceres wants to merge 2 commits intonestjs:masterfrom
Forceres:feat/client-redis-binary-format

Conversation

@Forceres
Copy link
Copy Markdown

@Forceres Forceres commented Apr 1, 2026

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

Now we can't directly get buffers from redis, so any custom binary formats are broken. Moreover, our redis output has to be json that contradicts to custom binary formats.

What is the new behavior?

We can pass returnBuffers to client options for listening on "messageBuffer" instead of "message" to get directly buffers from redis. createResponseCallback handles jsons as well as binary (but we have to pass custom deserializer to decode id from it)

Does this PR introduce a breaking change?

  • Yes
  • No

@coveralls
Copy link
Copy Markdown

coveralls commented Apr 1, 2026

Pull Request Test Coverage Report for Build 472dd428-2ae6-4d12-bfd5-a48cbbd1c630

Details

  • 6 of 9 (66.67%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.03%) to 89.828%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/microservices/client/client-redis.ts 6 9 66.67%
Files with Coverage Reduction New Missed Lines %
packages/microservices/client/client-redis.ts 1 79.39%
Totals Coverage Status
Change from base Build bcb7b573-9798-42cb-a347-1d1f9e70592c: -0.03%
Covered Lines: 7603
Relevant Lines: 8464

💛 - Coveralls

@kamilmysliwiec
Copy link
Copy Markdown
Member

Could you please add an integration test for this as well?

@Forceres
Copy link
Copy Markdown
Author

Forceres commented Apr 3, 2026

Could you please add an integration test for this as well?

Yeah, give me some time.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants