eandersson / amqpstorm

Thread-safe Python RabbitMQ Client & Management library
https://www.amqpstorm.io/
MIT License
186 stars 36 forks source link

Support alternate Message implemetation #85

Closed jhogg closed 3 years ago

jhogg commented 4 years ago

Adds support to basic.py/channel/get and channel/build_inbound_message to all specification of an alternate Message class, derived from BaseMessage, for the creation of messages read.

I was not sure the best way to implement test case(s) for an alternate Message implementation, so there are no test cases submitted at this time.

eandersson commented 4 years ago

This looks fine to me. I'll try to sit down and test it out sometime this week.

jhogg commented 4 years ago

Travis and flake8 all happy now. Sorry for the rapid commits, we're not running Travis and I don't have everything on my local system to handle your tests. I'll try and address both before any additional patches.

Let me know if you have any questions or would like anything fixed. Jay

eandersson commented 3 years ago

I didn't get the time to look last week, hopefully this week. Went camping 😄.

I like this idea and maybe something we should consider implementing something similar in other areas as well, e.g. allow hooks to collect stats.

jhogg commented 3 years ago

No issue. Enjoy any time you can get these days away from reality. I have a couple other changes in-flight and I'll give you some background on why I setup Message as an implementation if you wnat - just add @getaroom.com to my github name and hit me up.

eandersson commented 3 years ago

Sorry still haven't been able to get to this. At least I pushed 2.8.2 which has your first change in there! Hopefully sometime this week.

jhogg commented 3 years ago

@eandersson Any thoughts on pulling in this change?

eandersson commented 3 years ago

Sorry @jhogg I'll try to get to it this week.

eandersson commented 3 years ago

To get the ball rolling here I created a new branch called 2.x and the main branch will now be working towards the next major release 3.0 and merged this PR.