Skip to content

Instantly share code, notes, and snippets.

@benjaminws
Created January 19, 2011 16:15
Show Gist options
  • Save benjaminws/786376 to your computer and use it in GitHub Desktop.
Save benjaminws/786376 to your computer and use it in GitHub Desktop.
client.on('connected', function() {
num = num || 1000;
for (var i = 0; i < num; i++) {
txn = client.begin();
client.send({
'destination': queue,
'body': 'Testing' + i,
'persistent': 'true',
'transaction': txn
}, receipt);
client.commit(txn);
//client.abort(txn);
}
console.log('Produced ' + num + ' messages');
client.disconnect();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment