vernemq / vmq_mzbench

An MQTT loadtest and usage scenario tool for VerneMQ and other MQTT systems.
Apache License 2.0
42 stars 44 forks source link

MQTT live messaging scenario #40

Open arjunashetty opened 3 years ago

arjunashetty commented 3 years ago

Hi Team, I want to create scenario for following flow :

1) first 5 min , create 10010 client nodes. 2) make 10000 of these nodes to subscribe to 'n' topics 3) make 10 publisher to publish to 'n' topics 4) next 45 min , publishers will start sending messages , simultaneously subscribers will receive the messages on the topic 5) last 5 min , to disconnect all the nodes

Can you please help me to reproduce the scenario using vmq_mzbench. I have the mzbench setup working fine, need to create the scenario file for the same.

ioolkos commented 3 years ago

@arjunashetty Thanks, I'm happy to help with specific questions. Unfortunately, I don't have enough bandwidth to develop full scenarios for you. Maybe gradually adapt the example scripts can be an approach?

arjunashetty commented 3 years ago

yes, thank you @ioolkos. meanwhile, can you provide some hints how this can be achieved by vmq_mzbench ? may be atleast for the first two points listed above ?

arjunashetty commented 3 years ago

@ioolkos I need to run 10 publishers in parallel, each publishing to 10 topics, and run each of the topics for 5 min, i tried something like below can you please , help me to correct the following scenario? :

pool(size = 1, worker_type = mqtt_worker):

       connect([t(host, "mqtt-broker-stage-7f6880a9603aada4.elb.ap-southeast-1.amazonaws.com"),
                t(port,1883),
                t(username, "4ea5dbff-15c4-4ca2-a983-d9ebb538934f"),
                t(client,fixed_client_id("pool1", worker_id())),
                t(clean_session,true),
                t(keepalive_interval,60),
                t(proto_version,4), t(reconnect_timeout,4)
                ])

        set_signal(connect1, 1)
        wait_signal(connect1, 10)
        wait(4 sec)
        loop (iterator ="i", while = var("i")<10):
                        loop(time = 5 min, rate = 5 rps):
         publish("prefix/clients/topic- var("i")", random_binary(150), 2)
        disconnect()
arjunashetty commented 3 years ago

@ioolkos any updates on this ?