AMPS C/C++ Client Class Reference AMPS C/C++ Client Version 5.3.5.6

Public Member Functions | List of all members
AMPS::FailedResubscribeHandler Class Referenceabstract

Abstract base class where you can implement handling of exceptions that occur when a SubscriptionManager implementation is attempting to restart subscriptions following a connection failure. More...

`#include <ampsplusplus.hpp>`

## Public Member Functions
virtual bool | failure (const Message &message_, const MessageHandler &handler_, unsigned requestedAckTypes_, const AMPSException &exception_)=0
| Implement this function to return true if the subscription should be removed from the SubscriptionManager and false if it should be left and retried after the next failover. More...

## Detailed Description

Abstract base class where you can implement handling of exceptions that occur when a SubscriptionManager implementation is attempting to restart subscriptions following a connection failure.

## Member Function Documentation

## ◆ failure()

virtual bool AMPS::FailedResubscribeHandler::failure | ( | const Message & | message_,
|  | const MessageHandler & | handler_,
|  | unsigned | requestedAckTypes_,
|  | const AMPSException & | exception_
| ) |  |
| pure virtual

Implement this function to return true if the subscription should be removed from the SubscriptionManager and false if it should be left and retried after the next failover.

If any return false, then the current connection where the failure occured will be dropped and the reconnect process restarted.

Parameters

  message_ | The Message used to place the subscription.
  handler_ | The MessageHandler for the subscription.
  requestedAckTypes_ | The requested ack types for the handler.
  exception_ | The exception returned with the failure.

Returns
  True to remove the subscription from the SubscriptionManager or false to leave it in place for the next attempt.

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

- include/amps/ampsplusplus.hpp