userver-framework / userver

Production-ready C++ Asynchronous Framework with rich functionality
https://userver.tech
Apache License 2.0
2.31k stars 268 forks source link

Change urabbitmq::ConsumerComponentBase::Process signature so that it could receive at least headers and routing key #604

Closed TertiumOrganum1 closed 1 month ago

TertiumOrganum1 commented 1 month ago

Currently it has signature: void Process(std::string message); thus we lack queue name, headers and routing key and it is very inconvenient.

itrofimow commented 1 month ago

I'd suggest adding another Process override, which takes more data from consumer and by-default just calls Process(std::string). This way we could change consumer implementation to call the newly added method without breaking anyone

TertiumOrganum1 commented 1 month ago

agree

I'd suggest adding another Process override, which takes more data from consumer and by-default just calls Process(std::string). This way we could change consumer implementation to call the newly added method without breaking anyone

apolukhin commented 1 month ago

Fixed in https://github.com/userver-framework/userver/commit/7da063b1756575d130707183b056c3d8721f92c7

Many thanks for the repprt and for the PR!