AMPS C/C++ Client Class Reference
AMPS C/C++ Client Version 5.3.3.2
AMPS::Message::Options Class Reference

Class for constructing the options string to pass to AMPS in a Message. More...

#include <Message.hpp>

Public Member Functions

 Options (std::string options_="")
 ctor - default to None
 
void setNone (void)
 Clear any previously set options and set the options to an empty string (AMPS_OPTIONS_NONE). More...
 
void setLive (void)
 Set the live option for a bookmark subscription, which requests that the subscription receives messages before they are persisted to the transaction log after replay is complete. More...
 
void setOOF (void)
 Set the option to receive out of focus (OOF) messages on a subscription, where applicable. More...
 
void setReplace (void)
 Set the option to replace a current subscription with this one. More...
 
void setNoEmpties (void)
 Set the option to not send empty messages on a delta subscription. More...
 
void setSendKeys (void)
 Set the option to send key fields with a delta subscription. More...
 
void setTimestamp (void)
 Set the option to send a timestamp that the message was processed on a subscription or query. More...
 
void setNoSowKey (void)
 Set the option to not set the SowKey header on messages. More...
 
void setCancel (void)
 Set the cancel option, used on a sow_delete command to return a message to the queue. More...
 
void setResume (void)
 Set the option to resume a subscription. More...
 
void setPause (void)
 Set the option to pause a bookmark subscription. More...
 
void setFullyDurable (void)
 Set the option to only provide messages that have been persisted to all replication destinations that use synchronous acknowledgements. More...
 
void setMaxBacklog (int maxBacklog_)
 Set the option for maximum backlog this subscription is willing to accept. More...
 
void setConflation (const char *conflation_)
 Set the options for conflation on a subscription. More...
 
void setConflationKey (const char *conflationKey_)
 Set the options for the conflation key, the identifiers for the field or fields used by AMPS to determine which changes to the underlying topic are considered to be changes to a distinct record. More...
 
void setTopN (int topN_)
 Set the top N option, which specifies the maximum number of messages to return for this command. More...
 
void setRate (const char *rate_)
 Set the option for the maximum rate at which messages are provided to the subscription. More...
 
void setRateMaxGap (const char *rateMaxGap_)
 Set the option for the maximum amount of time that a bookmark replay with a specified rate will allow the subscription to go without producing messages. More...
 
void setSkipN (int skipN_)
 Set the option for skip N, the number of messages in the result set to skip before returning messages to a client. More...
 
void setProjection (const std::string &projection_)
 Set the option for projecting the results of an aggregated query or subscription. More...
 
template<class Iterator >
void setProjection (Iterator begin_, Iterator end_)
 Set the option for projecting the results of an aggregated query or subscription. More...
 
void setGrouping (const std::string &grouping_)
 Set the option for grouping the results of an aggregated query or subscription. More...
 
template<class Iterator >
void setGrouping (Iterator begin_, Iterator end_)
 Set the option for grouping the results of an aggregated query or subscription. More...
 
 operator const std::string ()
 Convert this object to a std::string, allows you to pass an Options object as the options_ argument directly.
 

Detailed Description

Class for constructing the options string to pass to AMPS in a Message.

This class can provide a convenient way to format an options string in a command provided to AMPS. Notice that this class is only intended to help with correctly formatting the options string and to provide constant values for option names. The class does not validate the values provided to options, or that the combination of options provided is useful or valid for any particular command.

Member Function Documentation

void AMPS::Message::Options::setCancel ( void  )
inline

Set the cancel option, used on a sow_delete command to return a message to the queue.

void AMPS::Message::Options::setConflation ( const char *  conflation_)
inline

Set the options for conflation on a subscription.

See the AMPS User Guide for a description of conflation, and see the AMPS Command Reference for details on this option.

Parameters
conflation_The conflation interval, auto, or none.
void AMPS::Message::Options::setConflationKey ( const char *  conflationKey_)
inline

Set the options for the conflation key, the identifiers for the field or fields used by AMPS to determine which changes to the underlying topic are considered to be changes to a distinct record.

The conflation key does not need to be the same as the keys configured for the topic. See the AMPS User Guide for details on conflation, and see the AMPS Command Reference for details on this option.

Parameters
conflationKey_The message key to use for conflation.
void AMPS::Message::Options::setFullyDurable ( void  )
inline

Set the option to only provide messages that have been persisted to all replication destinations that use synchronous acknowledgements.

This option is only valid for bookmark subscriptions that do not use the "live" option. See the AMPS User Guide and AMPS Command Reference for details.

void AMPS::Message::Options::setGrouping ( const std::string &  grouping_)
inline

Set the option for grouping the results of an aggregated query or subscription.

Parameters
grouping_The comma-separated list of grouping field names.
template<class Iterator >
void AMPS::Message::Options::setGrouping ( Iterator  begin_,
Iterator  end_ 
)
inline

Set the option for grouping the results of an aggregated query or subscription.

Parameters
begin_The starting forward iterator for field descriptions.
end_The ending forward iterator for field descriptions.
void AMPS::Message::Options::setLive ( void  )
inline

Set the live option for a bookmark subscription, which requests that the subscription receives messages before they are persisted to the transaction log after replay is complete.

This can, in case of a simultaneous AMPS failure and publisher failure, lead to an application receiving messages that do not appear in the transaction log. See the AMPS User Guide and the AMPS Command Reference for details.

void AMPS::Message::Options::setMaxBacklog ( int  maxBacklog_)
inline

Set the option for maximum backlog this subscription is willing to accept.

This option only applies to subscriptions to queue topics, and the server will only grant a backlog up to the maximum per subscription backlog configured for the queue. See the AMPS User Guide and the AMPS Command Reference for a description of queue backlogs, and see the AMPS Configuration Reference for details on configuring the queue.

Parameters
maxBacklog_The max unacked queue messages in backlog.
void AMPS::Message::Options::setNoEmpties ( void  )
inline

Set the option to not send empty messages on a delta subscription.

See the AMPS Command Reference for details.

void AMPS::Message::Options::setNone ( void  )
inline

Clear any previously set options and set the options to an empty string (AMPS_OPTIONS_NONE).

void AMPS::Message::Options::setNoSowKey ( void  )
inline

Set the option to not set the SowKey header on messages.

See the AMPS Command Reference for details.

void AMPS::Message::Options::setOOF ( void  )
inline

Set the option to receive out of focus (OOF) messages on a subscription, where applicable.

See the AMPS User Guide and the AMPS Command Reference for details.

void AMPS::Message::Options::setPause ( void  )
inline

Set the option to pause a bookmark subscription.

This option is typically used when entering a number of subscriptions for synchronized replay (for example, when duplicating message flow for analysis or testing purposes). The subscriptions are registered with the "pause" option one-by-one, and then simultaneously resumed to begin the replay. This option is only valid for bookmark subscriptions that do not use the "live" option. See the AMPS User Guide and AMPS Command Reference for details.

void AMPS::Message::Options::setProjection ( const std::string &  projection_)
inline

Set the option for projecting the results of an aggregated query or subscription.

Parameters
projection_A string containing the projection specification, either a single field description or a comma-separated list of field descriptions.
template<class Iterator >
void AMPS::Message::Options::setProjection ( Iterator  begin_,
Iterator  end_ 
)
inline

Set the option for projecting the results of an aggregated query or subscription.

Parameters
begin_The starting forward iterator for field descriptions.
end_The ending forward iterator for field descriptions.
void AMPS::Message::Options::setRate ( const char *  rate_)
inline

Set the option for the maximum rate at which messages are provided to the subscription.

This option is only valid for bookmark subscriptions. See the AMPS Command Reference for details.

Parameters
rate_The rate for sending messages on the bookmark subscription.
void AMPS::Message::Options::setRateMaxGap ( const char *  rateMaxGap_)
inline

Set the option for the maximum amount of time that a bookmark replay with a specified rate will allow the subscription to go without producing messages.

This option is only valid for bookmark subscriptions when a "rate" is specified, and prevents situations where a subscription would be idle for an extended period of time. For example, if a replay has a specified rate of "2x" and there is a quiet period in the transaction logs (overnight, weekends) where no matching messages were received for the subscription for 8 hours, the subscription would be idle for 4 hours unless a shorter maximum gap is specified using this option. See the AMPS Command Reference for details.

Parameters
rateMaxGap_The max gap between messages on the subscription.
void AMPS::Message::Options::setReplace ( void  )
inline

Set the option to replace a current subscription with this one.

See the AMPS User Guide and the AMPS Command Reference for details.

void AMPS::Message::Options::setResume ( void  )
inline

Set the option to resume a subscription.

This option is only valid for bookmark subscriptions that do not use the "live" option that have been previously paused. See the AMPS User Guide and the AMPS Command Reference for details.

void AMPS::Message::Options::setSendKeys ( void  )
inline

Set the option to send key fields with a delta subscription.

See the AMPS Command Reference for details.

void AMPS::Message::Options::setSkipN ( int  skipN_)
inline

Set the option for skip N, the number of messages in the result set to skip before returning messages to a client.

See the AMPS Command Reference for details.

Parameters
skipN_The number of messages to skip before sending to client.
void AMPS::Message::Options::setTimestamp ( void  )
inline

Set the option to send a timestamp that the message was processed on a subscription or query.

See the AMPS Command Reference for details.

void AMPS::Message::Options::setTopN ( int  topN_)
inline

Set the top N option, which specifies the maximum number of messages to return for this command.

See the AMPS Command Reference for details.

Parameters
topN_The max number of messages to return.

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