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

Pulsar function to read compacted topics #5538

Closed
candlerb opened this issue Nov 2, 2019 · 1 comment · Fixed by #7193
Closed

Pulsar function to read compacted topics #5538

candlerb opened this issue Nov 2, 2019 · 1 comment · Fixed by #7193
Assignees
Labels
help wanted type/feature The PR added a new feature or issue requested a new feature

Comments

@candlerb
Copy link
Contributor

candlerb commented Nov 2, 2019

Is your feature request related to a problem? Please describe.
Pulsar functions cannot currently be configured to read the compacted version of a topic.

Describe the solution you'd like
An option to pulsar-admin functions create/update, and/or setting in --function-config-file, to request subscribing to the compacted version of a topic.

Note: a function can have multiple topics as inputs. There are already other options which are on a per-input basis (e.g. custom-schema-inputs, custom-serde-inputs) so it ought to work like those.

Describe alternatives you've considered
It occurred to me that subscription options could be part of the topic URI, e.g.

persistent://public/default/my-topic?compacted=yes

... but that would be a major change if deployed everywhere that subscriptions are used.

Additional context
A similar option might be required for sinks.

PR #5532 adds a similar feature to start a sink from "earliest" rather than "latest" message. If that's just for sinks then it would be useful for functions too.

Hence there seems to be a more general case use around setting initial subscription options for both functions and sinks.

@315157973
Copy link
Contributor

Please assign it to me @codelipenghui

codelipenghui pushed a commit that referenced this issue Jul 2, 2020
Fixes #5538

### Motivation



### Modifications
In function mode and sink mode, PulsarSource can read compacted topic。
By `inputSpecs` parameter, each topic can independently decide whether to read compacted

### Verifying this change
unit test:
org.apache.pulsar.io.PulsarFunctionE2ETest#testReadCompactedFunction
org.apache.pulsar.io.PulsarFunctionE2ETest#testReadCompactedSink
huangdx0726 pushed a commit to huangdx0726/pulsar that referenced this issue Aug 24, 2020
Fixes apache#5538

### Motivation



### Modifications
In function mode and sink mode, PulsarSource can read compacted topic。
By `inputSpecs` parameter, each topic can independently decide whether to read compacted

### Verifying this change
unit test:
org.apache.pulsar.io.PulsarFunctionE2ETest#testReadCompactedFunction
org.apache.pulsar.io.PulsarFunctionE2ETest#testReadCompactedSink
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted type/feature The PR added a new feature or issue requested a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants