A few thousand messages per second is not trivial to implement. Luckily, the OpenAMQ project (http://www.openamq.org/) has scaled to handle 500,000 messages per second. It's supported by large institutions, it's open source and it looks well engineered. Take a gander. Bindings for perl are available (as well as Java, C#, C/C++, TCL, etc, etc).