Loading...
Searching...
No Matches
reconnect_options

Unsettled API - Options for reconnect and failover after connection loss. More...

`#include <reconnect_options.hpp>`

## Public Member Functions

| reconnect_options ()
| Create an empty set of options.
| reconnect_options (const reconnect_options &)
| Copy options.
reconnect_options & | operator= (const reconnect_options &)
| Copy options.
reconnect_options & | delay (duration)
| The base value for recurring delays.
reconnect_options & | delay_multiplier (float)
| The scaling multiplier for successive reconnect delays.
reconnect_options & | max_delay (duration)
| The maximum delay between successive connect attempts.
reconnect_options & | max_attempts (int)
| The maximum number of reconnect attempts.
reconnect_options & | failover_urls (const std::vector< std::string > &conn_urls)
| Deprecated - use connection_options::failover_urls Alternative connection URLs used for failover.

## Detailed Description

Unsettled API - Options for reconnect and failover after connection loss.

These options determine a series of delays to coordinate reconnection attempts. They may be open-ended or limited in time. They may be evenly spaced or increasing at an exponential rate.

Normal value semantics: copy or assign creates a separate copy of the options.

See also
  messaging_handler, connection_options::reconnect()

Examples
  simple_send.cpp.

## Member Function Documentation

## delay()

reconnect_options & delay | ( | duration |  | ) |

The base value for recurring delays.

The default is 10 milliseconds.

## delay_multiplier()

reconnect_options & delay_multiplier | ( | float |  | ) |

The scaling multiplier for successive reconnect delays.

The default is 2.0.

## max_delay()

reconnect_options & max_delay | ( | duration |  | ) |

The maximum delay between successive connect attempts.

The default duration::FOREVER, meaning no limit.

## max_attempts()

reconnect_options & max_attempts | ( | int |  | ) |

The maximum number of reconnect attempts.

The default is 0, meaning no limit.

## failover_urls()

reconnect_options & failover_urls | ( | const std::vector< std::string > & | conn_urls | ) |

Deprecated - use connection_options::failover_urls Alternative connection URLs used for failover.

There are none by default.

The documentation for this class was generated from the following file:

- proton/reconnect_options.hpp