Skip to content

Conversation

december1981
Copy link

@december1981 december1981 commented Aug 29, 2025

Summary

It would be good to be able to subscribe to multiple mqtt topics where we'd want to subscribe with eg prefix-1/# and prefix-2/# mqtt topic specs, without receiving data from the broker with topics beginning with prefix-3... (which would be a side effect of subscribing with the one topic spec string #).

This change doesn't break current tests, but I've held off on adding any new tests in case this PR will not be approved.

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the no-changelog label to this PR.

@december1981 december1981 requested a review from a team as a code owner August 29, 2025 11:52
@bits-bot
Copy link

bits-bot commented Aug 29, 2025

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added the domain: sources Anything related to the Vector's sources label Aug 29, 2025
@robin-dunn
Copy link

+1

@december1981 december1981 changed the title feature: support multiple mqtt source topics feat: support multiple mqtt source topics Aug 29, 2025
@december1981 december1981 changed the title feat: support multiple mqtt source topics feat(file source): support multiple mqtt source topics Aug 29, 2025
@thomasqueirozb thomasqueirozb changed the title feat(file source): support multiple mqtt source topics feat(mqtt source): support multiple mqtt source topics Aug 29, 2025
Copy link
Contributor

@thomasqueirozb thomasqueirozb left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution, this makes sense. Tests always appreciated :)

@pront can you take a look too?

@thomasqueirozb thomasqueirozb requested a review from pront August 29, 2025 15:12
@thomasqueirozb thomasqueirozb requested a review from a team as a code owner August 29, 2025 17:33
@github-actions github-actions bot added the domain: external docs Anything related to Vector's external, public documentation label Aug 29, 2025
Copy link
Contributor

@estherk15 estherk15 left a comment

Choose a reason for hiding this comment

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

Left one optional suggestion.

}
topic: {
description: "MQTT topic from which messages are to be read."
description: "MQTT topic or topics from which messages are to be read."
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
description: "MQTT topic or topics from which messages are to be read."
description: "MQTT topic(s) from which messages are read."

Copy link
Author

@december1981 december1981 Sep 1, 2025

Choose a reason for hiding this comment

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

I don't mind either way. I wrote it as topic or topics to make it a bit clearer that it could be specified as one or many (not just a single item of many for the former case)

@december1981
Copy link
Author

I'm going to update the mqtt integration tests today then, as this PR appears to be approved.

@pront pront self-assigned this Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: external docs Anything related to Vector's external, public documentation domain: sources Anything related to the Vector's sources source: mqtt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants