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

feat: emit batch #12954

Merged
merged 4 commits into from
Nov 20, 2024
Merged

Conversation

gunb0s
Copy link
Contributor

@gunb0s gunb0s commented Dec 20, 2023

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?

Issue Number: #12748

What is the new behavior?

enable kafka producer to emit batch

Does this PR introduce a breaking change?

  • [v] Yes
  • No

Other information

@coveralls
Copy link

coveralls commented Dec 20, 2023

Pull Request Test Coverage Report for Build d4f0316f-3bf4-4a53-b632-eebbc32fa552

Details

  • 14 of 22 (63.64%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.05%) to 92.051%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/microservices/client/client-kafka.ts 14 22 63.64%
Totals Coverage Status
Change from base Build 7ac098a9-c60b-4faa-9612-e3dbed2e2eb6: -0.05%
Covered Lines: 6728
Relevant Lines: 7309

💛 - Coveralls

Copy link
Contributor

@Tony133 Tony133 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the rest it seems ok 👍

async dispatchBatchEvent<TInput = any>(
packets: ReadPacket<{ messages: TInput[] }>,
): Promise<any> {
if (packets.data.messages.length === 0) return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (packets.data.messages.length === 0) return;
if (packets.data.messages.length === 0) {
return;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@apparelmagic-heath
Copy link

Would love to see this feature merged. Very handy for our use-case.

@bozorgmehr96
Copy link

bozorgmehr96 commented Mar 11, 2024

@kamilmysliwiec Is this going to be merged, and if so, do you have any estimates for when?

And another thing, are you open to batching now? You said no here, #9455
Since you green-lighted batch producing, I need batch consuming and want to know if I should also have hope for it. I might start a PR for it if I find some free time.

@binh-truong-tpv-mti
Copy link

hi all, pls consider this PR

@svitlana-konovalenko
Copy link

Hey there! Any updates?

@posquit0
Copy link

@Tony133 @kamilmysliwiec I need this feature, too! Could you consider to merge this PR?

@Tony133
Copy link
Contributor

Tony133 commented Nov 13, 2024

@Tony133 @kamilmysliwiec I need this feature, too! Could you consider to merge this PR?

It need to be seen whether it can be merged into version 10.x of NestJS or put into the future version 11.

@kamilmysliwiec kamilmysliwiec merged commit 6094701 into nestjs:master Nov 20, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants