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

Support for MQTT protocol #1269

Open
srimaln91 opened this issue Dec 11, 2019 · 11 comments
Open

Support for MQTT protocol #1269

srimaln91 opened this issue Dec 11, 2019 · 11 comments
Labels
evaluation needed proposal needs to be validated or tested before fully implementing it in k6 feature

Comments

@srimaln91
Copy link

Hi,

It would be really valuable if we can use k6 to simulate MQTT pub/sub interfaces.

Thanks.

@cuonglm cuonglm added evaluation needed proposal needs to be validated or tested before fully implementing it in k6 feature labels Dec 12, 2019
@a-bendoraitis
Copy link

Is there plan for MQTT support in k6? maybe there is plans to allow creating plugin architecture for different protocols? (in that case I think people would be happy to create open source plugins)
No MQTT support for me means that I have to look at JMeter or Tsung, but I'd rather use k6 if there was a choice

@na--
Copy link
Member

na-- commented Dec 4, 2020

k6 will probably natively support MQTT eventually, but I can't give any concrete estimates as to when, sorry. And speaking of plugins, yes, k6 already supports something like that, though we call them extensions. It's very likely that any MQTT module will start as an extension before we merge it into the core. Take a look at these links to learn more about extensions:

@pmalhaire
Copy link

pmalhaire commented Feb 12, 2021

I made a basic working mqtt extension here
https://github.com/pmalhaire/xk6-mqtt

it lacks more metrics but publish / subscribe message is working

@heliping
Copy link

gatling already supports mqtt. expecting this feature.

@pmalhaire
Copy link

pmalhaire commented Oct 30, 2021

The xk6 team contacted me and they want to extend this extension. It works and it's tested for basic use.
Comments and feature requests are welcome : https://github.com/pmalhaire/xk6-mqtt

@a-bendoraitis
Copy link

The xk6 team contacted me and they want to extend this extension. It works and it's tested for basic use. Comments and feature requests are welcome : https://github.com/pmalhaire/xk6-mqtt

We are using your extension to generate load, simulating thousands of IoT devices. MQTT works great, however we are having trouble with TLS. Can you comment what's the situation with TLS on the plugin side? Should it work out of the box?

@pmalhaire
Copy link

Hello, if you use a local TLS cert with custom CA there is a PR under merge on the subject.
If you use a public TLS cert it should work out of the box, check your TLS cert chain.
For exemple if you use docker and let's encrypt you may need to update certificate autorities.

@pmalhaire
Copy link

Don't hesitate to star the repo if you use it, it always helps.

@pmalhaire
Copy link

@arunasbend the local TLS MR has been merged, it is what you needed ?

@drundanibel
Copy link

@pmalhaire Basically a great approach from you! But it seems like there is still no support for user properties or other MQTTv5 features, right? So is this extension only for MQTTv3.1.1 and lower? Are there any plans to to move forward on this?

@pmalhaire
Copy link

pmalhaire commented Mar 3, 2023

@drundanibel I never needed MQTT v5.
It won't be a lot of work to add it since it's supported by the undelying lib.
Just a question of time and a bit of arch to keep backward compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
evaluation needed proposal needs to be validated or tested before fully implementing it in k6 feature
Projects
None yet
Development

No branches or pull requests

7 participants