<trclass="memdesc:gad87a2cef4f4ddf64696f9864773c37cf"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates a <aclass="el"href="group__types_group.html#ga023712711f5c289663fc2223e83686d3"title="Way to configure a stanSubscription.">stanSubOptions</a> object. <br/></td></tr>
<trclass="memdesc:gaa018bceba99ef3726157e87c6918ab14"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the Durable Name for this subscription. <br/></td></tr>
<trclass="memdesc:gafbb4e6c74978c4e8f30f016c20cc2bdf"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the timeout for waiting for an ACK from the cluster's point of view for delivered messages. <br/></td></tr>
<trclass="memitem:ga35efbdea888e00440c500845064931c0"id="r_ga35efbdea888e00440c500845064931c0"><tdclass="memItemLeft"align="right"valign="top"><aclass="el"href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a><aclass="el"href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__stan_sub_opts_group.html#ga35efbdea888e00440c500845064931c0">stanSubOptions_SetMaxInflight</a> (<aclass="el"href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts, int maxInflight)</td></tr>
<trclass="memdesc:ga35efbdea888e00440c500845064931c0"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the the maximum number of messages the cluster will send without an ACK. <br/></td></tr>
<trclass="memdesc:ga6cb7f6e1ac697d16959f9042eeb84dc1"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the desired start position based on the given sequence number. <br/></td></tr>
<trclass="memdesc:gaafd7a553486eea3c9d309da0744a3608"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the desired start position based on the given time. <br/></td></tr>
<trclass="memdesc:ga27d9175901997b8468997019746599b5"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the desired start position based on the given delta. <br/></td></tr>
<trclass="memdesc:ga856a74e31f3307faf988747c1f88717c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The subscription should start with the last message in the channel. <br/></td></tr>
<trclass="memdesc:gab09b81358e93199a4631eb06f1ec179f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The subscription should start with the first message in the channel. <br/></td></tr>
<trclass="memdesc:ga1b56877d0a6729e148c9c288e2b88e3f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Destroys a <aclass="el"href="group__types_group.html#ga023712711f5c289663fc2223e83686d3"title="Way to configure a stanSubscription.">stanSubOptions</a> object. <br/></td></tr>
<p>Creates a <aclass="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 <aclass="el"href="group__stan_conn_sub_group.html#gae545358fdc493baf6d29429a8156781f"title="Creates a subscription.">stanConnection_Subscribe()</a> or <aclass="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>
<dlclass="section note"><dt>Note</dt><dd>The object needs to be destroyed when no longer needed.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="group__stan_conn_sub_group.html#gae545358fdc493baf6d29429a8156781f"title="Creates a subscription.">stanConnection_Subscribe()</a></dd>
<dd>
<aclass="el"href="group__stan_conn_sub_group.html#ga17d42bf9a4fa39470561a1a668e6b4a2"title="Creates a queue subscription.">stanConnection_QueueSubscribe()</a></dd>
<dd>
<aclass="el"href="group__stan_sub_opts_group.html#ga1b56877d0a6729e148c9c288e2b88e3f"title="Destroys a stanSubOptions object.">stanSubOptions_Destroy()</a></dd></dl>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">newOpts</td><td>the location where store the pointer to the newly created <aclass="el"href="group__types_group.html#ga023712711f5c289663fc2223e83686d3"title="Way to configure a stanSubscription.">stanSubOptions</a> object. </td></tr>
<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>
<dlclass="section note"><dt>Note</dt><dd>Durable names should be alphanumeric and not contain the character <code>:</code>.</dd></dl>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">opts</td><td>the pointer to the <aclass="el"href="group__types_group.html#ga023712711f5c289663fc2223e83686d3"title="Way to configure a stanSubscription.">stanSubOptions</a> object. </td></tr>
<tr><tdclass="paramname">durableName</td><td>the string representing the name of the durable subscription. </td></tr>
<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>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">opts</td><td>the pointer to the <aclass="el"href="group__types_group.html#ga023712711f5c289663fc2223e83686d3"title="Way to configure a stanSubscription.">stanSubOptions</a> object. </td></tr>
<tr><tdclass="paramname">wait</td><td>how long the server will wait for an acknowledgment from the subscription. </td></tr>
<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>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">opts</td><td>the pointer to the <aclass="el"href="group__types_group.html#ga023712711f5c289663fc2223e83686d3"title="Way to configure a stanSubscription.">stanSubOptions</a> object. </td></tr>
<tr><tdclass="paramname">maxInflight</td><td>the maximum number of messages the subscription will receive without sending back ACKs. </td></tr>
<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>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">opts</td><td>the pointer to the <aclass="el"href="group__types_group.html#ga023712711f5c289663fc2223e83686d3"title="Way to configure a stanSubscription.">stanSubOptions</a> object. </td></tr>
<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 <aclass="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>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">opts</td><td>the pointer to the <aclass="el"href="group__types_group.html#ga023712711f5c289663fc2223e83686d3"title="Way to configure a stanSubscription.">stanSubOptions</a> object. </td></tr>
<tr><tdclass="paramname">time</td><td>the start time, expressed in milliseconds since the EPOCH. </td></tr>
<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>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">opts</td><td>the pointer to the <aclass="el"href="group__types_group.html#ga023712711f5c289663fc2223e83686d3"title="Way to configure a stanSubscription.">stanSubOptions</a> object. </td></tr>
<tr><tdclass="paramname">delta</td><td>he historical time delta (from now) from which to start receiving messages. </td></tr>
<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>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">opts</td><td>the pointer to the <aclass="el"href="group__types_group.html#ga023712711f5c289663fc2223e83686d3"title="Way to configure a stanSubscription.">stanSubOptions</a> object. </td></tr>
<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>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">opts</td><td>the pointer to the <aclass="el"href="group__types_group.html#ga023712711f5c289663fc2223e83686d3"title="Way to configure a stanSubscription.">stanSubOptions</a> object. </td></tr>
<p>By default, a subscription will automatically send a message acknowledgment after the <aclass="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 <aclass="el"href="group__stan_sub_group.html#ga3a1cca9fa3ea54fcf7a43fd1335a26d3"title="Acknowledge a message.">stanSubscription_AckMsg()</a>.</p>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="group__stan_sub_group.html#ga3a1cca9fa3ea54fcf7a43fd1335a26d3"title="Acknowledge a message.">stanSubscription_AckMsg()</a></dd></dl>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">opts</td><td>the pointer to the <aclass="el"href="group__types_group.html#ga023712711f5c289663fc2223e83686d3"title="Way to configure a stanSubscription.">stanSubOptions</a> object. </td></tr>
<tr><tdclass="paramname">manual</td><td>a boolean indicating if the subscription should auto-acknowledge or if the user will. </td></tr>
<p>Destroys the <aclass="el"href="group__types_group.html#ga023712711f5c289663fc2223e83686d3"title="Way to configure a stanSubscription.">stanSubOptions</a> object, freeing used memory. See the note in the <aclass="el"href="group__stan_sub_opts_group.html#gad87a2cef4f4ddf64696f9864773c37cf"title="Creates a stanSubOptions object.">stanSubOptions_Create()</a> call.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">opts</td><td>the pointer to the <aclass="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 -->
<divid="nav-path"class="navpath"><!-- id is needed for treeview function! -->
<ul>
<liclass="footer">NATS.IO Supported By Synadia Communications Inc.