Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
stomp client test script
* Test Stomp Throughput
* @author Shane Harter
require 'stomp/Stomp.php';
$start = microtime(true);
$stomp = new Stomp('tcp://localhost:61613');
$queue = 'shane_test';
$persistent = false;
$message_size = 20;
$message = str_repeat(1, $message_size);
$count = 0;
echo PHP_EOL, "Beginning Test...";
while(microtime(true) - $start < 30) {
$stomp->send($queue, $message, array('persistent' => $persistent));
echo PHP_EOL, "Client: Stomp\tPersistent: {$persistent}\tMessage Size: {$message_size}\tCount: $count";
echo PHP_EOL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment