rabbitmq / rabbitmq-perf-test

A load testing tool
https://www.rabbitmq.com/java-tools.html
Other
357 stars 110 forks source link

Create message payload from template files #224

Open acogoluegnes opened 4 years ago

acogoluegnes commented 4 years ago

From the mailing list.

Payload for published messages could be based on one or several template files that would contain placeholders to make the content dynamic, e.g.:

{
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9",
    "payload": {
        "trxid": "DEPOSIT-PUBSUB-${uuid}",
        "trx_amount": ${list('5000','10000','50000')},
        "trx_notes": "${list('Deposit','Expense')}"
    }
}

Other candidate "functions" in placeholder could be sequence, random (not an UUID, just a random, 10-character long string).

Functions could accept arguments, e.g. ${random(length:16, cache:50)}.

typekpb commented 4 years ago

any timeline on this one? For me would be the sequence function important

michaelklishin commented 4 years ago

@typekpb this is open source software so you are welcome to contribute it.

michaelklishin commented 4 years ago

@acogoluegnes is there a library that handles such template functions or we'd have to effectively develop a tiny templating language ourselves? In the latter case this probably shouldn't be labeled with effort-low :)

acogoluegnes commented 4 years ago

@michaelklishin Fair enough, this will require a custom development, adding effort-medium :-)