blog.absurd:li - press play on tape
February 9th 2010
Tagged thrift, RPC, AMQP

toamqp 0.3.1 released

Just a quick note to let you know that I am releasing toamqp today. I’ve already presented all the novelties in this place, now its time to get the code some action.

This release includes many bugfixes and code cleanups. It also features a TOAMQP::SpecServer helper class that allows easier testing of the code. With this testing becomes a breeze – you set it up like this:


  server = TOAMQP.server(MyHandler.new, TOAMQP::SpecServer)

Then you get two options; either you make all the calls and then call


  server.serve

This will act on all the messages that wait at the broker and then return. When you want to satisfy your mock’s expectations, this is the method to use.

You can also use


  server.serve_in_thread

and then go off and make a bunch of client calls. Just don’t forget to tear down this server thread:


  server.stop_and_join

This will wait for the thread to close down.

Conclusion

Do go off and have fun with this release. And by all means, tell me what doesn’t work.