Python STOMP Updates

20.09.2009 10:29

posted by: Benjamin Smith

Posted Under: , , , , , , ,

Due to a flurry of activity(like, you know, a couple people) on bitbucket and twitter, it became apparent to me that people were actually using the library I created for working with message brokers that utilize the STOMP protocol. This is exciting news for me! ;-)

In response I decided it would be a good idea to, you know, maintain the software and polish it up a bit. There were three forks of the python-stomp repository on
bitbucket, so I waded through diffs to see what ideas/suggestions/improvements others had. Everything I saw looked great, so I pulled in and merged all the changes in to the main repository. Thankfully this was a trivial task because mercurial is FREAKING AWESOME. The next step was to polish it all up. So, I went to PEP8ifying where needed(thankfully others had done a great deal of that work for me), and unit testing new functionality introduced by the other developers.

There are many improvements/changes in the latest iteration of this library, so I’d like to outline some of them here.

  • Renamed to stompy
  • Fully documented with Sphinx
  • Simplified client interface with automatic transaction support (abstracted stompy.stomp as stompy.simple)
  • Intermediate message queue layer
  • Simplified authentication
  • More resilient and informative error handling
  • Polling/Non-blocking support
  • Now able to subscribe to multiple destinations at a time
  • Tested and known to work well with ActiveMQ and RabbitMQ
  • Now available on pypi!

This is just a high level overview of the major changes to stompy. For more detailed information, have a look at the source and documentation.

I’d like to thank a few people that have submitted patches and new functionality.

In closing, I’d like to point out that this “project” was an exercise in TDD(Test Driven Development) for me. I wrote the tests first, then the actual code to make the tests pass. This was also the first time I had used the mocking library Dingus. This has been a pleasurable and enlightening development experience for me!

Thanks for reading!

2 comments | 0 pingbacks
Add post to: Delicious Reddit Slashdot Digg Technorati Google
Comment

Comments

wiz 21.09.2009 7:53

Great job done!

reply
Jesper Noehr 21.09.2009 9:31

Great to hear it. That’s what happens when you share your code ;-) Good to finally have it on pypy too. Keep up the good work!

reply

Comment form for «Python STOMP Updates»

Required. 30 chars of fewer.

Required.

captcha image Please, enter symbols, which you see on the image