Skip to content

feat(inputs.nats_consumer): Allow configuring Jetstream stream - #17710

Merged
mstrandboge merged 4 commits into
influxdata:masterfrom
reindlt:nats-consumer-js-stream-name
Oct 9, 2025
Merged

feat(inputs.nats_consumer): Allow configuring Jetstream stream#17710
mstrandboge merged 4 commits into
influxdata:masterfrom
reindlt:nats-consumer-js-stream-name

Conversation

@reindlt

@reindlt reindlt commented Sep 29, 2025

Copy link
Copy Markdown
Contributor

Summary

Currently, it is not possible to consume message from a sourced stream as it is missing a subject and thus specifying jetstream_subject doesn't work.

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #11737

@telegraf-tiger telegraf-tiger Bot added feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Sep 29, 2025
@reindlt
reindlt force-pushed the nats-consumer-js-stream-name branch from df67f7c to 7400c5d Compare September 30, 2025 08:26
@reindlt
reindlt marked this pull request as ready for review September 30, 2025 10:16

@srebhan srebhan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @reindlt for your contribution! One question in the code, otherwise the code looks good.

Comment thread plugins/inputs/nats_consumer/nats_consumer.go
@srebhan srebhan self-assigned this Oct 2, 2025
@srebhan srebhan changed the title feat(inputs.nats_consumer): add jetstream_stream config option Oct 8, 2025

@srebhan srebhan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @reindlt! Some comments from my side...

Comment thread plugins/inputs/nats_consumer/nats_consumer_test.go Outdated
Comment thread plugins/inputs/nats_consumer/nats_consumer_test.go Outdated
Comment thread plugins/inputs/nats_consumer/nats_consumer_test.go Outdated
Comment thread plugins/inputs/nats_consumer/nats_consumer_test.go Outdated
Comment thread plugins/inputs/nats_consumer/nats_consumer_test.go Outdated
Comment thread plugins/inputs/nats_consumer/nats_consumer_test.go Outdated
Comment thread plugins/inputs/nats_consumer/nats_consumer_test.go Outdated
@reindlt

reindlt commented Oct 8, 2025

Copy link
Copy Markdown
Contributor Author

Thanks @reindlt! Some comments from my side...

Thanks for the suggestions @srebhan. Most of them also apply to function TestSendReceive. Would you like me to change it there as well or do you prefer opening a different PR for that?

@srebhan

srebhan commented Oct 8, 2025

Copy link
Copy Markdown
Member

@reindlt I would appreciate if you could fix the TestSendReceive in a separate PR.

@telegraf-tiger

telegraf-tiger Bot commented Oct 9, 2025

Copy link
Copy Markdown
Contributor

@srebhan srebhan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @reindlt!

@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Oct 9, 2025
@srebhan srebhan assigned skartikey and mstrandboge and unassigned srebhan Oct 9, 2025
@mstrandboge
mstrandboge merged commit bebceb1 into influxdata:master Oct 9, 2025
25 of 27 checks passed
@github-actions github-actions Bot added this to the v1.37.0 milestone Oct 9, 2025
@Hipska

Hipska commented Oct 10, 2025

Copy link
Copy Markdown
Contributor

@reindlt What will the subject tag contain for metrics coming from such a stream?

@reindlt

reindlt commented Oct 10, 2025

Copy link
Copy Markdown
Contributor Author

The subject tag will contain the subject defined at the replication source @Hipska .

@Hipska

Hipska commented Oct 10, 2025

Copy link
Copy Markdown
Contributor

Thanks. Could you have a look at #17792 and see if that works for you?

@reindlt

reindlt commented Oct 13, 2025

Copy link
Copy Markdown
Contributor Author

Looks good to me, thanks.

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

Labels

feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.

5 participants