Appendix B. Extension Points

Client Extension Points

This table lists the extension points provided by the AMPS Client and HAClient to allow applications to customize behavior.

Name Purpose Applies to Notes
Exception Listener Callback that receives exceptions thrown on the client receive thread.

Client, HAClient

Asynchronous message processing; event callbacks

Recommended for applications that use asynchronous message processing.

Must be implemented by the application.

Failed Write Handler Callback that receives notification when a publish or sow_delete command fails and the Client has requested a persisted acknowledgment (this acknowledgment is requested by default when a publish store is present).

Client, HAClient

Used for failure of operations that modify data in AMPS when set on the Client or HAClient.

Recommended for any publisher that requires reliable publish.

Must be implemented by the application.

Server Chooser Callback used to determine which AMPS server connection string to use to connect.

HAClient

Used when connecting to AMPS. Must be explicitly set by the application.

Recommended to be implemented by the application.

DefaultServerChooser not recommended for production use.

Authenticator Callback used to provide credentials to use for logon based on the connection string.

Client, HAClient

Used when logging on. A default authenticator is used if none is provided by the application.

Default authenticator extracts password from standard URI format.

Application must implement for other behavior.

Reconnect Delay Strategy Callback used to determine the delay between reconnection attempts. Used to prevent a “thundering herd” problem for sites with large numbers of connections.

HAClient

Used when an HAClient is connecting or reconnecting. A default strategy is installed when an HAClient is constructed.

Library provides a fixed delay and an exponential delay with jitter.

60East recommends using the provided implementations where possible.

Subscription Manager Used to store subscriptions for a Client, to be replayed on reconnection.

Client, HAClient

HAClient disconnect handler replays subscriptions on reconnect.

Library provides an in-memory manager.

60East recommends using the provided implementation where possible.

Bookmark Store Used to store information about messages received and processed to manage the recovery point for bookmark subscriptions.

Client, HAClient

Used to determine recovery point when a bookmark subscription is entered or restored.

Used when an application enters a bookmark subscription.

Library provides implementations of Bookmark Store.

60East recommends using the provided implementation where possible.

Publish Store Used to store messages to be published to AMPS.

Client, HAClient

Client replays messages to the AMPS server on reconnect as necessary.

Library provides implementations of Publish Store.

60East recommends using the provided implementations where possible.

Recovery Point Adapter Used by a Bookmark Store to save recovery points for bookmark subscriptions to persistence other than a local file system.

Bookmark Store

Used when an application enters a bookmark subscription.

Library provides an implementation of the recovery point adapter that uses an AMPS SOW topic for storage and recovery.

Application must implement for other behavior.