-
Notifications
You must be signed in to change notification settings - Fork 196
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
MQTT Sub Sampler: Timeout Option for Sample on 'Number or received messages' #125
Open
br41nst0rm
wants to merge
21
commits into
emqx:master
Choose a base branch
from
br41nst0rm:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Added .idea/ folder to gitignore * Fixed various typos, including in the README * Implemented fix for buggy decoding exception, updated decoding standard in general * Merged a semi-functional, configurable solution for waiting for a limited amount of sampler response messages with timeout
* Added factual corrections to README * Fixed various typos throughout README
* Renamed main project package to reflect that this is not a product made by XMeter
* Removed download folder to avoid binaries in working tree, possible confusion and due to redundancy
* Reverted package name to 'net.xmeter'
br41nst0rm
changed the title
MQTT Sub Sampler: Sample on 'Number or received messages' is missing timeout option
MQTT Sub Sampler: Timeout Option for Sample on 'Number or received messages'
Aug 15, 2022
richturner
reviewed
May 30, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
i think a timeout option is missing in the 'MQTT Sub Sampler' with SampleOnCondition set to 'Number or received messages'.
It basicly deadlocks a thread when awaited messages never arrive, or, respectively, was not send back in the first place ..for who knows what reasons.
With our customer we have usecases were we need to measure the time it takes from publishing a messages and receiving a response on different topics (with processing backends involved).
Script would do something like this:
thread1 publishes a message on topic1 -> a backend system receive and processes the message and sends a message/response to topic2 -> thread1 meanwhile subscribed to topic2 and waits for that message/response.
We want to be able to at least measure the time from publishing the message on topic1 to receiving the response on topic2. Considering the backend could also have issues and may not send a response at all, which would be a problematic situation which needs to be handled like an error. But, when thread1 that subscribed to topic2 would then wait basically forever for that one message/response to arrive and those the thread actually is caught in a deadlock situation and no error is logged.
So, for that, I think the easiest thing is to implement a [optional] timeout option, were, when the sampler runs into that timeout the sampler fails and reports an error.
Thats what i've done, Please have a look
Regards
SampleOnCondition: 'Number or received messages' -> timeoutTextField is enabled
If timeout is set to 0 the Sub Sampler behaves like ever before and waits for all messages to arrive (never times out)
SampleOnCondition: 'specified elapsed time (ms)' -> timeoutTextField is disabled