[Twisted-Python] Using Twisted with MQ

David Mitchell monch1962 at gmail.com
Fri Jun 8 20:46:23 MDT 2007


Hello all,

I've got what I think is a potential application for Twisted, but I'm
having trouble figuring out whether Twisted is going to be the best
path or not.  I've worked through the Twisted Finger tutorial and read
through the "Ball of snakes" O'Reilly book, but I'm not sure I've got
my head around Twisted sufficiently.

I have to simulate a server that reads messages off IBM's MQ queues,
and posts responses back to different MQ queues.  I've used both pymqi
and Python/COM (on Windows only) to perform this sort of task in the
past, but now I need something that's going to be able to respond to
incoming MQ messages at a very high rate.

I suspect I'm going to have to use reactor.callInThread to spawn off
threads within Twisted in order to handle IO with the MQ queues, as
I'm not aware of any event-based interface to MQ and therefore any
reads/writes from queues are potentially going to block for a while.

Is Twisted suited for this sort of application?  Better yet, is anyone
aware of info I can access regarding this sort of application with
Twisted? - Google hasn't been much help...

Thanks in advance

Dave Mitchell




More information about the Twisted-Python mailing list