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

fix(cli): optimize client id gen logic for bench #1829

Merged
merged 3 commits into from
Dec 10, 2024
Merged

fix(cli): optimize client id gen logic for bench #1829

merged 3 commits into from
Dec 10, 2024

Conversation

ysfscream
Copy link
Member

PR Checklist

If you have any questions, you can refer to the Contributing Guide

What is the current behavior?

The simulate command does not support fixed client IDs. It automatically appends an index to prevent duplication, which can cause issues when a fixed client ID is required.

mqttx simulate -sc tesla -c 1 -I "test"

# Client ID: test_1

What is the new behavior?

The simulate and other bench commands now support fixed client IDs. If the -c parameter is set to 1, the client ID will remain unchanged unless it contains a %i placeholder. This allows for more flexible client ID configurations, which are especially useful for scenarios like sending data to other platforms.

mqttx simulate -sc tesla -c 1 -I "test"

# Client ID: test

Does this PR introduce a breaking change?

  • Yes
  • No

@ysfscream ysfscream added enhancement New feature or request fix Fix bug or issues CLI MQTTX CLI labels Dec 10, 2024
@ysfscream ysfscream added this to the v1.11.1 milestone Dec 10, 2024
@ysfscream ysfscream requested a review from Red-Asuka December 10, 2024 08:03
@ysfscream ysfscream self-assigned this Dec 10, 2024
@Red-Asuka Red-Asuka merged commit d2dfda5 into main Dec 10, 2024
6 checks passed
@Red-Asuka Red-Asuka deleted the ysf/cli branch December 10, 2024 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI MQTTX CLI enhancement New feature or request fix Fix bug or issues
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants