If each input message can be placed into a dataset (for example, CSV file), you could create a test that reads the input row of data and drops the message on the queue.
The dataset is set to End the Test when the rows are exhausted. And, the step that places the message on the queue loops back to the dataset so the next row of data can be put to the queue. You could add assertions, filters, and other steps to provide additional logic based on your specific requirements.