nats.zig/deps/nats.c/doc/html/group__stan_sub_opts_group.html
torque 41fbdf886b
git subrepo pull --branch=v3.7.0 deps/nats.c
subrepo:
  subdir:   "deps/nats.c"
  merged:   "5d057f6"
upstream:
  origin:   "https://github.com/nats-io/nats.c.git"
  branch:   "v3.7.0"
  commit:   "5d057f6"
git-subrepo:
  version:  "0.4.6"
  commit:   "affc4c01a"
2023-10-14 13:22:13 -07:00

523 lines
36 KiB
HTML

<!-- HTML header for doxygen 1.8.10-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<title>NATS C Client with JetStream and Streaming support: Streaming Subscription Options</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;" >
<div id="projectname">NATS C Client with JetStream and Streaming support
&#160;<span id="projectnumber">3.7.0</span>
</div>
<div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('group__stan_sub_opts_group.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle"><div class="title">Streaming Subscription Options<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a></div></div></div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gad87a2cef4f4ddf64696f9864773c37cf" id="r_gad87a2cef4f4ddf64696f9864773c37cf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#gad87a2cef4f4ddf64696f9864773c37cf">stanSubOptions_Create</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> **newOpts)</td></tr>
<tr class="memdesc:gad87a2cef4f4ddf64696f9864773c37cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3" title="Way to configure a stanSubscription.">stanSubOptions</a> object. <br /></td></tr>
<tr class="separator:gad87a2cef4f4ddf64696f9864773c37cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa018bceba99ef3726157e87c6918ab14" id="r_gaa018bceba99ef3726157e87c6918ab14"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#gaa018bceba99ef3726157e87c6918ab14">stanSubOptions_SetDurableName</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts, const char *durableName)</td></tr>
<tr class="memdesc:gaa018bceba99ef3726157e87c6918ab14"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the Durable Name for this subscription. <br /></td></tr>
<tr class="separator:gaa018bceba99ef3726157e87c6918ab14"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafbb4e6c74978c4e8f30f016c20cc2bdf" id="r_gafbb4e6c74978c4e8f30f016c20cc2bdf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#gafbb4e6c74978c4e8f30f016c20cc2bdf">stanSubOptions_SetAckWait</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts, int64_t wait)</td></tr>
<tr class="memdesc:gafbb4e6c74978c4e8f30f016c20cc2bdf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the timeout for waiting for an ACK from the cluster's point of view for delivered messages. <br /></td></tr>
<tr class="separator:gafbb4e6c74978c4e8f30f016c20cc2bdf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga35efbdea888e00440c500845064931c0" id="r_ga35efbdea888e00440c500845064931c0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#ga35efbdea888e00440c500845064931c0">stanSubOptions_SetMaxInflight</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts, int maxInflight)</td></tr>
<tr class="memdesc:ga35efbdea888e00440c500845064931c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the the maximum number of messages the cluster will send without an ACK. <br /></td></tr>
<tr class="separator:ga35efbdea888e00440c500845064931c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6cb7f6e1ac697d16959f9042eeb84dc1" id="r_ga6cb7f6e1ac697d16959f9042eeb84dc1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#ga6cb7f6e1ac697d16959f9042eeb84dc1">stanSubOptions_StartAtSequence</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts, uint64_t seq)</td></tr>
<tr class="memdesc:ga6cb7f6e1ac697d16959f9042eeb84dc1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the desired start position based on the given sequence number. <br /></td></tr>
<tr class="separator:ga6cb7f6e1ac697d16959f9042eeb84dc1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaafd7a553486eea3c9d309da0744a3608" id="r_gaafd7a553486eea3c9d309da0744a3608"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#gaafd7a553486eea3c9d309da0744a3608">stanSubOptions_StartAtTime</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts, int64_t time)</td></tr>
<tr class="memdesc:gaafd7a553486eea3c9d309da0744a3608"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the desired start position based on the given time. <br /></td></tr>
<tr class="separator:gaafd7a553486eea3c9d309da0744a3608"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga27d9175901997b8468997019746599b5" id="r_ga27d9175901997b8468997019746599b5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#ga27d9175901997b8468997019746599b5">stanSubOptions_StartAtTimeDelta</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts, int64_t delta)</td></tr>
<tr class="memdesc:ga27d9175901997b8468997019746599b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the desired start position based on the given delta. <br /></td></tr>
<tr class="separator:ga27d9175901997b8468997019746599b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga856a74e31f3307faf988747c1f88717c" id="r_ga856a74e31f3307faf988747c1f88717c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#ga856a74e31f3307faf988747c1f88717c">stanSubOptions_StartWithLastReceived</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts)</td></tr>
<tr class="memdesc:ga856a74e31f3307faf988747c1f88717c"><td class="mdescLeft">&#160;</td><td class="mdescRight">The subscription should start with the last message in the channel. <br /></td></tr>
<tr class="separator:ga856a74e31f3307faf988747c1f88717c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab09b81358e93199a4631eb06f1ec179f" id="r_gab09b81358e93199a4631eb06f1ec179f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#gab09b81358e93199a4631eb06f1ec179f">stanSubOptions_DeliverAllAvailable</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts)</td></tr>
<tr class="memdesc:gab09b81358e93199a4631eb06f1ec179f"><td class="mdescLeft">&#160;</td><td class="mdescRight">The subscription should start with the first message in the channel. <br /></td></tr>
<tr class="separator:gab09b81358e93199a4631eb06f1ec179f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6f49ae2629e49d2bfa35990cf030bf83" id="r_ga6f49ae2629e49d2bfa35990cf030bf83"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#ga6f49ae2629e49d2bfa35990cf030bf83">stanSubOptions_SetManualAckMode</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts, bool manual)</td></tr>
<tr class="memdesc:ga6f49ae2629e49d2bfa35990cf030bf83"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the subscription's acknowledgment mode. <br /></td></tr>
<tr class="separator:ga6f49ae2629e49d2bfa35990cf030bf83"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1b56877d0a6729e148c9c288e2b88e3f" id="r_ga1b56877d0a6729e148c9c288e2b88e3f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#ga1b56877d0a6729e148c9c288e2b88e3f">stanSubOptions_Destroy</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts)</td></tr>
<tr class="memdesc:ga1b56877d0a6729e148c9c288e2b88e3f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys a <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3" title="Way to configure a stanSubscription.">stanSubOptions</a> object. <br /></td></tr>
<tr class="separator:ga1b56877d0a6729e148c9c288e2b88e3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>NATS Streaming Subscription Options. </p>
<h2 class="groupheader">Function Documentation</h2>
<a id="gad87a2cef4f4ddf64696f9864773c37cf" name="gad87a2cef4f4ddf64696f9864773c37cf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad87a2cef4f4ddf64696f9864773c37cf">&#9670;&#160;</a></span>stanSubOptions_Create()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanSubOptions_Create </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> **&#160;</td>
<td class="paramname"><em>newOpts</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3" title="Way to configure a stanSubscription.">stanSubOptions</a> object. This object is used when one wants to set specific options prior to create a subscription.</p>
<p>After making the appropriate <code>stanSubOptions_SetXXX()</code> calls, this object is passed to the <a class="el" href="group__stan_conn_sub_group.html#gae545358fdc493baf6d29429a8156781f" title="Creates a subscription.">stanConnection_Subscribe()</a> or <a class="el" href="group__stan_conn_sub_group.html#ga17d42bf9a4fa39470561a1a668e6b4a2" title="Creates a queue subscription.">stanConnection_QueueSubscribe()</a> call, which will clone this object. It means that modifications to the options object will not affect the created subscription.</p>
<p>The default options set in this call are: ackWait: 30000 milliseconds (30 seconds) maxIinflight: 1024 start position: new only</p>
<dl class="section note"><dt>Note</dt><dd>The object needs to be destroyed when no longer needed.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__stan_conn_sub_group.html#gae545358fdc493baf6d29429a8156781f" title="Creates a subscription.">stanConnection_Subscribe()</a> </dd>
<dd>
<a class="el" href="group__stan_conn_sub_group.html#ga17d42bf9a4fa39470561a1a668e6b4a2" title="Creates a queue subscription.">stanConnection_QueueSubscribe()</a> </dd>
<dd>
<a class="el" href="group__stan_sub_opts_group.html#ga1b56877d0a6729e148c9c288e2b88e3f" title="Destroys a stanSubOptions object.">stanSubOptions_Destroy()</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">newOpts</td><td>the location where store the pointer to the newly created <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3" title="Way to configure a stanSubscription.">stanSubOptions</a> object. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="gaa018bceba99ef3726157e87c6918ab14" name="gaa018bceba99ef3726157e87c6918ab14"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa018bceba99ef3726157e87c6918ab14">&#9670;&#160;</a></span>stanSubOptions_SetDurableName()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanSubOptions_SetDurableName </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *&#160;</td>
<td class="paramname"><em>opts</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>durableName</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>If a durable name is set, this subscription will be durable. It means that if the application stops and re-create the same subscription with the same connection client ID and durable name (or simply durable name for queue subscriptions), then the server will resume (re)delivery of messages from the last known position in the steam for that durable.</p>
<p>It means that the start position, if provided, is used only when the durable subscription is first created, then is ignored by the server for the rest of the durable subscription lifetime.</p>
<dl class="section note"><dt>Note</dt><dd>Durable names should be alphanumeric and not contain the character <code>:</code>.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3" title="Way to configure a stanSubscription.">stanSubOptions</a> object. </td></tr>
<tr><td class="paramname">durableName</td><td>the string representing the name of the durable subscription. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="gafbb4e6c74978c4e8f30f016c20cc2bdf" name="gafbb4e6c74978c4e8f30f016c20cc2bdf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafbb4e6c74978c4e8f30f016c20cc2bdf">&#9670;&#160;</a></span>stanSubOptions_SetAckWait()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanSubOptions_SetAckWait </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *&#160;</td>
<td class="paramname"><em>opts</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int64_t&#160;</td>
<td class="paramname"><em>wait</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Value expressed in milliseconds.</p>
<p>Default is 30000 milliseconds (30 seconds).</p>
<p>If the server does not receive an acknowledgment from the subscription for a delivered message after this amount of time, the server will re-deliver the unacknowledged message.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3" title="Way to configure a stanSubscription.">stanSubOptions</a> object. </td></tr>
<tr><td class="paramname">wait</td><td>how long the server will wait for an acknowledgment from the subscription. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ga35efbdea888e00440c500845064931c0" name="ga35efbdea888e00440c500845064931c0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga35efbdea888e00440c500845064931c0">&#9670;&#160;</a></span>stanSubOptions_SetMaxInflight()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanSubOptions_SetMaxInflight </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *&#160;</td>
<td class="paramname"><em>opts</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>maxInflight</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Default is 1024.</p>
<p>If a subscription receives messages but does not acknowledge them, the server will stop sending new messages when it reaches this number. Unacknowledged messages are re-delivered regardless of that setting.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3" title="Way to configure a stanSubscription.">stanSubOptions</a> object. </td></tr>
<tr><td class="paramname">maxInflight</td><td>the maximum number of messages the subscription will receive without sending back ACKs. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ga6cb7f6e1ac697d16959f9042eeb84dc1" name="ga6cb7f6e1ac697d16959f9042eeb84dc1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6cb7f6e1ac697d16959f9042eeb84dc1">&#9670;&#160;</a></span>stanSubOptions_StartAtSequence()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanSubOptions_StartAtSequence </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *&#160;</td>
<td class="paramname"><em>opts</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint64_t&#160;</td>
<td class="paramname"><em>seq</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This allows the subscription to start at a specific sequence number in the channel's message log.</p>
<p>If the sequence is smaller than the first available message in the message log (old messages dropped due to channel limits), the subscription will be created with the first available sequence.</p>
<p>Conversely, if the given sequence is higher than the currently last sequence number, the subscription will receive only new published messages.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3" title="Way to configure a stanSubscription.">stanSubOptions</a> object. </td></tr>
<tr><td class="paramname">seq</td><td>the starting sequence. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="gaafd7a553486eea3c9d309da0744a3608" name="gaafd7a553486eea3c9d309da0744a3608"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaafd7a553486eea3c9d309da0744a3608">&#9670;&#160;</a></span>stanSubOptions_StartAtTime()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanSubOptions_StartAtTime </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *&#160;</td>
<td class="paramname"><em>opts</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int64_t&#160;</td>
<td class="paramname"><em>time</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>When the subscription is created, the server will send messages starting with the message which timestamp is at least the given time. The time is expressed in number of milliseconds since the EPOCH, as given by <a class="el" href="group__library_group.html#gaa3c10ba3ae001595007ad0dc5dccc15e" title="Gives the current time in milliseconds.">nats_Now()</a> for instance.</p>
<p>If the time is in the past and the most recent message's timestamp is older than the given time, or if the time is in the future, the subscription will receive only new messages.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3" title="Way to configure a stanSubscription.">stanSubOptions</a> object. </td></tr>
<tr><td class="paramname">time</td><td>the start time, expressed in milliseconds since the EPOCH. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ga27d9175901997b8468997019746599b5" name="ga27d9175901997b8468997019746599b5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga27d9175901997b8468997019746599b5">&#9670;&#160;</a></span>stanSubOptions_StartAtTimeDelta()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanSubOptions_StartAtTimeDelta </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *&#160;</td>
<td class="paramname"><em>opts</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int64_t&#160;</td>
<td class="paramname"><em>delta</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>When the subscription is created, the server will send messages starting with the message which timestamp is at least now minus <code>delta</code>. In other words, this means start receiving messages that were sent n milliseconds ago.</p>
<p>The delta is expressed in milliseconds.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3" title="Way to configure a stanSubscription.">stanSubOptions</a> object. </td></tr>
<tr><td class="paramname">delta</td><td>he historical time delta (from now) from which to start receiving messages. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ga856a74e31f3307faf988747c1f88717c" name="ga856a74e31f3307faf988747c1f88717c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga856a74e31f3307faf988747c1f88717c">&#9670;&#160;</a></span>stanSubOptions_StartWithLastReceived()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanSubOptions_StartWithLastReceived </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *&#160;</td>
<td class="paramname"><em>opts</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>When the subscription is created, the server will start sending messages starting with the last message currently in the channel message's log. The subscription will then receive any new published message.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3" title="Way to configure a stanSubscription.">stanSubOptions</a> object. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="gab09b81358e93199a4631eb06f1ec179f" name="gab09b81358e93199a4631eb06f1ec179f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab09b81358e93199a4631eb06f1ec179f">&#9670;&#160;</a></span>stanSubOptions_DeliverAllAvailable()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanSubOptions_DeliverAllAvailable </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *&#160;</td>
<td class="paramname"><em>opts</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>When the subscription is created, the server will start sending messages starting with the first message currently in the channel message's log.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3" title="Way to configure a stanSubscription.">stanSubOptions</a> object. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ga6f49ae2629e49d2bfa35990cf030bf83" name="ga6f49ae2629e49d2bfa35990cf030bf83"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6f49ae2629e49d2bfa35990cf030bf83">&#9670;&#160;</a></span>stanSubOptions_SetManualAckMode()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanSubOptions_SetManualAckMode </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *&#160;</td>
<td class="paramname"><em>opts</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>manual</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>By default, a subscription will automatically send a message acknowledgment after the <a class="el" href="group__callbacks_group.html#gaf7456e37fa14f1834d9048d3789e9409" title="Callback used to deliver messages to the application.">stanMsgHandler</a> callback returns.</p>
<p>In order to control when the acknowledgment is sent, set the acknowledgment mode to <code>manual</code> and call <a class="el" href="group__stan_sub_group.html#ga3a1cca9fa3ea54fcf7a43fd1335a26d3" title="Acknowledge a message.">stanSubscription_AckMsg()</a>.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__stan_sub_group.html#ga3a1cca9fa3ea54fcf7a43fd1335a26d3" title="Acknowledge a message.">stanSubscription_AckMsg()</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3" title="Way to configure a stanSubscription.">stanSubOptions</a> object. </td></tr>
<tr><td class="paramname">manual</td><td>a boolean indicating if the subscription should auto-acknowledge or if the user will. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ga1b56877d0a6729e148c9c288e2b88e3f" name="ga1b56877d0a6729e148c9c288e2b88e3f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1b56877d0a6729e148c9c288e2b88e3f">&#9670;&#160;</a></span>stanSubOptions_Destroy()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void stanSubOptions_Destroy </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *&#160;</td>
<td class="paramname"><em>opts</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Destroys the <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3" title="Way to configure a stanSubscription.">stanSubOptions</a> object, freeing used memory. See the note in the <a class="el" href="group__stan_sub_opts_group.html#gad87a2cef4f4ddf64696f9864773c37cf" title="Creates a stanSubOptions object.">stanSubOptions_Create()</a> call.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3" title="Way to configure a stanSubscription.">stanSubOptions</a> object to destroy. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.10-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">NATS.IO Supported By Synadia Communications Inc.
<a href="http://www.nats.io">
</a></li>
</ul>
</div>
</body>
</html>