Skip to content

Commit

Permalink
Merge pull request #24 from parsifal-47/master
Browse files Browse the repository at this point in the history
Shorter syntax with the same semantics
  • Loading branch information
ioolkos authored Jun 27, 2018
2 parents 7d8f686 + ff8bdca commit b5c4750
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 52 deletions.
15 changes: 8 additions & 7 deletions scenarios/1_to_1.bdl
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ pool(size = 1000,
worker_type = mqtt_worker,
worker_start = poisson(100 rps)):

connect([t(host, "127.0.0.1"),
t(port,1883),
t(client,fixed_client_id("pool1", worker_id())),
t(clean_session,true),
t(keepalive_interval,60),
t(proto_version,4), t(reconnect_timeout,10)
])
connect(host = "127.0.0.1",
port = 1883,
client = fixed_client_id("pool1", worker_id()),
clean_session = true,
keepalive_interval = 60,
proto_version = 4,
reconnect_timeout = 10
)
wait(10 sec)
subscribe_to_self("prefix/clients/", 0)
set_signal(pool1, 1)
Expand Down
38 changes: 20 additions & 18 deletions scenarios/fan_in.bdl
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,33 @@ make_install(git = "https://github.com/erlio/vmq_mzbench.git",

pool(size = 1,
worker_type = mqtt_worker):

connect([t(host, "127.0.0.1"),
t(port,1883),
t(client,"subscriber1"),
t(clean_session,true),
t(keepalive_interval,60),
t(proto_version,4), t(reconnect_timeout,4)
])


connect(host = "127.0.0.1",
port = 1883,
client = "subscriber1",
clean_session = true,
keepalive_interval = 60,
proto_version = 4,
reconnect_timeout = 4
)

wait(1 sec)
subscribe("prefix/clients/#", 0)


pool(size = 1000,
worker_type = mqtt_worker,
worker_start = poisson(1000 rps)):

connect([t(host, "127.0.0.1"),
t(port,1883),
t(client,fixed_client_id("pool1", worker_id())),
t(clean_session,true),
t(keepalive_interval,60),
t(proto_version,4), t(reconnect_timeout,4)
])


connect(host = "127.0.0.1",
port = 1883,
client = fixed_client_id("pool1", worker_id()),
clean_session = true,
keepalive_interval = 60,
proto_version = 4,
reconnect_timeout = 4
)

set_signal(connect1, 1)
wait_signal(connect1, 1000)
wait(4 sec)
Expand Down
38 changes: 20 additions & 18 deletions scenarios/fan_out.bdl
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@ make_install(git = "https://github.com/erlio/vmq_mzbench.git",
pool(size = 1000,
worker_type = mqtt_worker,
woker_start = poisson(1000 rps)):

connect([t(host, "127.0.0.1"),
t(port,1883),
t(client,fixed_client_id("subscriber_pool1", worker_id())),
t(clean_session,true),
t(keepalive_interval,60),
t(proto_version,4), t(reconnect_timeout,4)
])


connect(host = "127.0.0.1",
port = 1883,
client = fixed_client_id("subscriber_pool1", worker_id()),
clean_session = true,
keepalive_interval = 60,
proto_version = 4,
reconnect_timeout = 4
)

set_signal(subscribe1, 1)
wait_signal(subscribe1, 1000)
wait(10 sec)
Expand All @@ -33,15 +34,16 @@ pool(size = 1000,

pool(size = 1,
worker_type = mqtt_worker):

connect([t(host, "127.0.0.1"),
t(port,1883),
t(client,fixed_client_id("publisher_pool1", worker_id())),
t(clean_session,true),
t(keepalive_interval,60),
t(proto_version,4), t(reconnect_timeout,4)
])


connect(host = "127.0.0.1",
port = 1883,
client = fixed_client_id("publisher_pool1", worker_id()),
clean_session = true,
keepalive_interval = 60,
proto_version = 4,
reconnect_timeout = 4
)

set_signal(connect1, 1)
wait_signal(connect1, 1)
wait(4 sec)
Expand Down
18 changes: 9 additions & 9 deletions scenarios/use_client_cert.bdl
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ pool(size = 100,
worker_type = mqtt_worker,
worker_start = poisson(100 rps)):

connect([t(host, "127.0.0.1"),
t(port, 8883),
t(client,fixed_client_id("pool1", worker_id())),
t(clean_session,true),
t(keepalive_interval,60),
t(proto_version,4), t(reconnect_timeout,15),
t(transport, t(ssl, [t(reuse_sessions, false),
connect(host = "127.0.0.1",
port = 8883,
client = fixed_client_id("pool1", worker_id()),
clean_session = true,
keepalive_interval = 60,
proto_version = 4, reconnect_timeout = 15,
transport = t(ssl, [t(reuse_sessions, false),
t(key, load_client_key(resource(keyfile))),
t(cacerts, load_cas(resource(cacertsfile))),
t(cert,load_client_cert(resource(certfile)))]))
])
t(cert,load_client_cert(resource(certfile)))])
)
wait(10 sec)
subscribe_to_self("test/topic/", 0)
set_signal(connect1, 1)
Expand Down

0 comments on commit b5c4750

Please sign in to comment.