client-ios/MigratoryDataGlobals.h

Include global constants and typedefs.

Functions

Name
typedef NS_ENUM(NSInteger , MigratoryDataLogLevel )
This class enumerates the MigratoryData logging levels.
typedef NS_ENUM(NSInteger , MigratoryDataQoS )
The quality of service (QoS) levels for MigratoryData messaging.
typedef NS_ENUM(NSInteger , MigratoryDataMessageType )
The message type received from MigratoryData server.

Attributes

Name
NSString * NOTIFY_SERVER_UP
A constant which indicates that the client successfully connected to a MigratoryData server.
NSString * NOTIFY_SERVER_DOWN
A constant which indicates that the client failed to connect to a MigratoryData server.
NSString * NOTIFY_DATA_SYNC
A constant which indicates that after a failover reconnection, the client successfully synchronized a subscribed subject with the latest retained message available for that subject, as well as with all messages made available during the failover period for that subject.
NSString * NOTIFY_DATA_RESYNC
A constant which indicates that after a failover reconnection, the client successfully synchronized a subscribed subject with the latest retained message available for that subject, but not with the potential messages made available during the failover period, therefore behaving as a new client.
NSString * NOTIFY_MESSAGE_SIZE_LIMIT_EXCEEDED
A constant which indicates that the client was unable to publish a message because the size of the message exceeds the message size limit allowed by the server (see the server parameter MAX_MESSAGE_SIZE).
NSString * NOTIFY_SUBSCRIBE_ALLOW
A constant which indicates that the client was authorized to subscribe to a subject.
NSString * NOTIFY_SUBSCRIBE_DENY
A constant which indicates that the client was not authorized to subscribe to a subject.
NSString * NOTIFY_PUBLISH_OK
A constant which indicates that the client successfully published a message.
NSString * NOTIFY_PUBLISH_FAILED
A constant which indicates that the client was unable to publish a message.
NSString * NOTIFY_PUBLISH_DENIED
A constant which indicates that the client was unable to publish a message because it is not allowed by the entitlement system.
NSString * CONSTANT_WINDOW_BACKOFF
A constant used to define the reconnect policy.
NSString * TRUNCATED_EXPONENTIAL_BACKOFF
A constant used to define the reconnect policy.
NSString * TRANSPORT_HTTP
A constant used to define the transport type.
NSString * TRANSPORT_WEBSOCKET
A constant used to define the transport type.

Functions Documentation

function NS_ENUM

typedef NS_ENUM(
    NSInteger ,
    MigratoryDataLogLevel 
)

This class enumerates the MigratoryData logging levels.

The available logging levels ordered by verbosity are:

  • LOG_ERROR (less verbose)
  • LOG_INFO
  • LOG_DEBUG
  • LOG_TRACE (most verbose) For production usage, we recommend the default LOG_INFO logging level.

The LOG_ERROR level turns on the error logs of the API.

The LOG_INFO level turns on the info, warning, and error logs of the API.

The LOG_DEBUG level turns on the debug, info, warning, and error logs of the API.

The LOG_TRACE level turns on all the logs of the API.

function NS_ENUM

typedef NS_ENUM(
    NSInteger ,
    MigratoryDataQoS 
)

The quality of service (QoS) levels for MigratoryData messaging.

The MigratoryDataQoS.STANDARD should be used for noncritical messages which will not be included in the cache of the MigratoryData cluster. In this way, after a connection recovery, a client will not receive as part of the recovery process the messages with MigratoryDataQoS.STANDARD.

Note: This QoS level corresponds to the at-most-once delivery semantics.

The MigratoryDataQoS.GUARANTEED should be used for critical messages which will be included in the cache of the MigratoryData cluster. In this way, after a connection recovery, a client will receive as part of the recovery process the messages with MigratoryDataQoS.GUARANTEED.

Note: This QoS level corresponds to the at-least-once delivery semantics. Also, it might correspond to the exactly-once delivery semantics provided that subscribers are responsible for filtering out duplicate receptions, if it at all matters for the application. Typically, a small buffer containing the identifiers of recently-received messages is sufficient for this task.

function NS_ENUM

typedef NS_ENUM(
    NSInteger ,
    MigratoryDataMessageType 
)

The message type received from MigratoryData server.

The message from the server is snapshot type.

The message from the server is update type.

The message from the server is recovered type.

The message from the server is historical type.

Attributes Documentation

variable NOTIFY_SERVER_UP

NSString * NOTIFY_SERVER_UP;

A constant which indicates that the client successfully connected to a MigratoryData server.

variable NOTIFY_SERVER_DOWN

NSString * NOTIFY_SERVER_DOWN;

A constant which indicates that the client failed to connect to a MigratoryData server.

variable NOTIFY_DATA_SYNC

NSString * NOTIFY_DATA_SYNC;

A constant which indicates that after a failover reconnection, the client successfully synchronized a subscribed subject with the latest retained message available for that subject, as well as with all messages made available during the failover period for that subject.

variable NOTIFY_DATA_RESYNC

NSString * NOTIFY_DATA_RESYNC;

A constant which indicates that after a failover reconnection, the client successfully synchronized a subscribed subject with the latest retained message available for that subject, but not with the potential messages made available during the failover period, therefore behaving as a new client.

variable NOTIFY_MESSAGE_SIZE_LIMIT_EXCEEDED

NSString * NOTIFY_MESSAGE_SIZE_LIMIT_EXCEEDED;

A constant which indicates that the client was unable to publish a message because the size of the message exceeds the message size limit allowed by the server (see the server parameter MAX_MESSAGE_SIZE).

variable NOTIFY_SUBSCRIBE_ALLOW

NSString * NOTIFY_SUBSCRIBE_ALLOW;

A constant which indicates that the client was authorized to subscribe to a subject.

variable NOTIFY_SUBSCRIBE_DENY

NSString * NOTIFY_SUBSCRIBE_DENY;

A constant which indicates that the client was not authorized to subscribe to a subject.

variable NOTIFY_PUBLISH_OK

NSString * NOTIFY_PUBLISH_OK;

A constant which indicates that the client successfully published a message.

variable NOTIFY_PUBLISH_FAILED

NSString * NOTIFY_PUBLISH_FAILED;

A constant which indicates that the client was unable to publish a message.

variable NOTIFY_PUBLISH_DENIED

NSString * NOTIFY_PUBLISH_DENIED;

A constant which indicates that the client was unable to publish a message because it is not allowed by the entitlement system.

variable CONSTANT_WINDOW_BACKOFF

NSString * CONSTANT_WINDOW_BACKOFF;

A constant used to define the reconnect policy.

See [MigratoryDataClient.setQuickReconnectInitialDelay()] for more details about this policy.

variable TRUNCATED_EXPONENTIAL_BACKOFF

NSString * TRUNCATED_EXPONENTIAL_BACKOFF;

A constant used to define the reconnect policy.

See [MigratoryDataClient.setQuickReconnectInitialDelay()] for more details about this policy.

variable TRANSPORT_HTTP

NSString * TRANSPORT_HTTP;

A constant used to define the transport type.

See [MigratoryDataClient.setTransport()] for more details about this policy.

variable TRANSPORT_WEBSOCKET

NSString * TRANSPORT_WEBSOCKET;

A constant used to define the transport type.

See [MigratoryDataClient.setTransport()] for more details about this policy.

Source code

/*
 * Copyright (c) 2007-2020 Migratory Data Systems (http://migratorydata.com)
 * ALL RIGHTS RESERVED. Use is subject to license terms.
 */

extern NSString *NOTIFY_SERVER_UP;

extern NSString *NOTIFY_SERVER_DOWN;

extern NSString *NOTIFY_DATA_SYNC;

extern NSString *NOTIFY_DATA_RESYNC;

extern NSString *NOTIFY_MESSAGE_SIZE_LIMIT_EXCEEDED;

extern NSString *NOTIFY_SUBSCRIBE_ALLOW;

extern NSString *NOTIFY_SUBSCRIBE_DENY;

extern NSString *NOTIFY_PUBLISH_OK;

extern NSString *NOTIFY_PUBLISH_FAILED;

extern NSString *NOTIFY_PUBLISH_DENIED;

extern NSString *CONSTANT_WINDOW_BACKOFF;

extern NSString *TRUNCATED_EXPONENTIAL_BACKOFF;

extern NSString *TRANSPORT_HTTP;

extern NSString *TRANSPORT_WEBSOCKET;

typedef NS_ENUM(NSInteger, MigratoryDataLogLevel) {

    LOG_ERROR,

    LOG_INFO,

    LOG_DEBUG,

    LOG_TRACE
};

typedef NS_ENUM(NSInteger, MigratoryDataQoS) {
    STANDARD = 0,

    GUARANTEED
};

typedef NS_ENUM(NSInteger, MigratoryDataMessageType) {
    SNAPSHOT = 1,

    UPDATE,

    RECOVERED,

    HISTORICAL
};

Updated on 6 November 2020 at 13:20:01 EET