praekeltfoundation / vumi

Messaging engine for the delivery of SMS, Star Menu and chat messages to diverse audiences in emerging markets and beyond.
BSD 3-Clause "New" or "Revised" License
420 stars 131 forks source link

Make Worker AMQP connection a Service #1000

Open jerith opened 8 years ago

jerith commented 8 years ago

This is necessary for #999.

jerith commented 8 years ago

As part of this issue, I'm replacing txamqp (which is effectively unmaintained) with pika, which has support for a variety of I/O mechanisms (including Twisted plain Python stuff) and is actively maintained.

smn commented 8 years ago

Wouldn't it be easier to first focus on splitting out the txamqp dependencies instead of also adding pika? I'm worried it'll be more difficult for people to follow along otherwise. And where's the code for this living?

jerith commented 8 years ago

The current iteration is in https://github.com/praekelt/vumi/tree/experiment/issue-1000-pika-based-service

The changes to the AMQP layer are pretty hefty even without swapping txamqp out for pika, and txamqp has enough undocumented oddities that I don't think it's really much extra effort to make the switch. I'm pretty sure the pika version will be cleaner and easier to understand, given the amount of time I've spent struggling with txamqp connection setup this week.

That said, this is still fairly experimental and I might end up dropping pika if it doesn't go as smoothly as I expect.