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

Python STOMP Implementation

03.04.2009 19:42

posted by: Benjamin Smith

Posted Under: , , ,

Everyone else is doing it!

Quite seriously though… In my dealings with JMS Message Queuing, specifically with ActiveMQ, I felt the lack of a simple, straight-forward and easy to use Python implementation of the protocol that was also well documented and hackable.

More often than not, I found myself using Perl’s Net::Stomp module because it was so much quicker to get going. Gasp you say, a Perl module that is easier to use than a Python module?! BLASPHEMY! I implore you to believe me!

I don’t think I’ve reinvented the wheel, merely rounded it to my specifications. So, if you choose, check out my implementation of STOMP in Python over at Bitbucket: python-stomp.

It is feature-complete according to the STOMP Protocol, 100% Unit test covered, documented, comes with example usage and is simple to use.

Feedback is appreciated in the form of issues on the Bitbucket issue tracker or this blog if you want to say something nice, or mean about it!

Documentation:

Code:

0 comments | 0 pingbacks

All the cool kids are doing it, right?

16.06.2008 9:05

posted by: Benjamin Smith

Posted Under: , ,

Here’s my wordle, with my name removed. All my posts contain my name, so it was among the largest of words! I couldn’t look conceded, now could I?

4 comments | 0 pingbacks
More Posts: