If we are requested to perform something like this, we ensure that no more messages can enter the site and that all messages are queued on the outbound thread that is on hold (phold_obd).
We …
save the messages in case the test fails; and
execute a ‘release’ (prls_obd); and
execute a ‘hold’ (phold_obd).
We generally scripted this with a one second delay between the release and hold and referred to this as a ‘blip’.
If the messages failed, we would clear the site and reload (hcicmd) from our saved file.
We found that, depending on a lot of things, from 1 to 20 message could be sent.
If you are after exact control, then, with a similar setup to the above, you can save the messages and clear them from the database. Grab the first ‘n’ messages and use the hcicmd command to send them. Note that if all is OK, you’ll need to remove the first ‘n’ from your main list before these are sent.
Note you’ll need to send them as outbound data!