I do not know any AMQP broker implemented in Python. And I do not know about the "lite" implementation as a whole; I believe that the implementation of the AMQP broker is complex enough so that those who are trying to do this, either strive to be close to one of the versions of the AMQP specification, or do not worry at all. :)
I also do not quite understand how the broker works with the same problems as launching a test web server for your web application.
The web server does nothing useful if your application does not run inside it, and when developing your application it makes sense to execute it without the need for a full deployment.
But you do not implement the internal functions of the broker, and you can configure it dynamically so that (unlike the web server) it does not need to be restarted every time you change your code. Exchanges, bindings, and queues can be declared by the application under test and then automatically deleted afterwards.
Installing RabbitMQ is not at all complicated, and it is unlikely to need any configuration, if any, because it has a default user account vhost and guest, which are suitable for use in an isolated test environment. Therefore, I never had a problem running RabbitMQ on my test machine.
Perhaps you had some special problem that I did not think about. if so, please leave a comment (or expand your question) to explain this.
Edit: Recently, I have conducted quite a few tests of AMQP-based applications, and I found the RabbitMQ Control Plugin very useful. It includes an HTTP API , which I use to do things like create a new vhost for each test run, and then destroy it to clear the brokerage state. This makes the current tests for the general broker much less intrusive. Using the HTTP API to manage this, rather than the testable AMQP client, avoids having the tests become somewhat circular.
source share