userver
userver copied to clipboard
wip on userver amqp
Addresses https://github.com/userver-framework/userver/issues/44
Just a few nitpicks for now. Will take a deeper look later
This PR is still a work in progress (it's even draft here on github) and it has a lot of places that require more attention from me, so much deeper look is not required/expected yet. I created this PR for 2 reasons mostly:
- Show you guys that some work is being done and in what state it is
- I would appreciate some hints on reusing socket logic from non-coroutine threads (socket logic itself ain't that hard to copy-paste,
TlsWrapper
is another story)
There are 2 problems with Socket: Wait
call in Direction::PerformIo
and this Lock - they both expect to be executed/used from coroutine threads.
What i did for now is just some ugly tricks that are not expected to stay just to make my draft work
To summarize:
- thoughtful review is not required/expected yet, but suggestions would be appreciated anyway
- how do i reuse
TslWrapper
from non-coroutine threads?
Although there are some feature that are either absent or could be done better i'll call it a day for now. Features i'm talking about are:
- Headers in Publish/Admin:: methods (absent)
- Metrics (could be done better)
- Tests (probably could be done better) - tests for different errors are somewhat lacking, but it's almost impossible to implement them: that would require manual intervention via
rabbitmqctl
or complete outside control of running RabbitMQ server. - Dynamic config (absent)
I might get back to these features at some point, but i'd like to feature-freeze this PR 'cause i'm a bit exhausted with it.
@apolukhin @segoon @nUl1 could you please have a look?
Thank you for the awesome patch!