Skip to content

Conversation

dc1992
Copy link
Contributor

@dc1992 dc1992 commented Jan 13, 2025

  • Replaced map() with a for to correctly manage async code in client
  • ConsumerFunc returns void | Promise to handle async code
  • Changed default credit policy to creditsOnChunkCompleted(1, 1)
  • Updated tests to have an async function that handle messages
  • Updated README.md

@dc1992 dc1992 linked an issue Jan 13, 2025 that may be closed by this pull request
@dc1992 dc1992 requested review from tarzacodes, icappello and gpad and removed request for tarzacodes January 14, 2025 13:58
Copy link
Contributor

@tarzacodes tarzacodes left a comment

Choose a reason for hiding this comment

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

The ConsumerFunc can be async or sync if I'm not mistaken - a lot of these changes, in the tests, are to substitute sync functions with async ones which makes the PR a lot harder to digest and check. Unless those changes in the tests are necessary to highlight some change in behaviour, I'd revert them

@dc1992 dc1992 merged commit 96f3443 into main Jan 15, 2025
2 checks passed
@dc1992 dc1992 deleted the 214-question-async-consumerfunc branch January 15, 2025 09:03
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.

[Question] Async ConsumerFunc
3 participants