Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

retrying_amqp_connection: commonize more amqp connection management stuff #9294

Merged
merged 9 commits into from
Jul 17, 2020

Conversation

spoonincode
Copy link
Contributor

Change Description

Getting a bit tired of copy pasting around some amqp connection management stuff in a few places. retrying_amqp_connection tries to solve the typical use case of needing a single channel connected to an AMQP server that is retried on failure. Compared to the code that was in reliable_amqp_publisher previously, a few functional differences are:

  • Doesn’t use AMQP::LibBoostAsioHandler; AMQP-CPP upstream is very clear that this isn’t supported
  • Doesn’t rely on AMQP’s TCP module; that would break a win32 build
  • Retries the connection/channel every second instead of a back off on consecutive failures
  • Doesn’t print the AMQP password to logs (whoops)

But there will likely be future improvements easier to add this way too, like TLS support with peer auth for example.

Change Type

Select ONE

  • Documentation
  • Stability bug fix
  • Other
  • Other - special case

Consensus Changes

  • Consensus Changes

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

if (a.vhost() != "/")
str.append(a.vhost());

v = str;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be: v = std::move(str); as fc::variant takes string by value.

@spoonincode spoonincode merged commit be62840 into develop-boxed Jul 17, 2020
@spoonincode spoonincode deleted the retrying_amqp_connection branch July 17, 2020 18:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants