apache / apache/pulsar

[Go Functions] NewOutputMessage does not cache producers

Open
#9,511 1 comment 0 reactions 0 assignees View on GitHub
lifecycle/stale type/enhancement
Dominant language
Java
Stars
15.3k
Forks
3.8k
Avg merge
1d 22h
Merged PRs (30d)
142

Description

The multi-dispatch functionality in Go Functions (as implemented with `NewOuputMessage()` in #8327) needs some rethinking. The primary concern of this issue is that it creates a new producer for every output message which is then immediately discarded after one message. At the very least, these producers should be cached, as [suggested here](https://github.com/apache/pulsar/pull/8327#discussion_r511014789). The other concern is one of API/Naming, which I have detailed in a separate issue.

Contributor guide

Open the contributing guide

Research direction

Review the Go Functions implementation introduced in PR #8327, starting at NewOuputMessage(), and trace how producers are created for each output message. Confirm the intended producer reuse with focused tests; done means producers are cached rather than recreated and discarded for every message.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
distributed-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.