nats.zig/deps/nats.c/doc/html/structjs_sub_options.html
torque 79a45fd2e3
git subrepo clone (merge) --branch=v3.6.1 https://github.com/nats-io/nats.c.git deps/nats.c
subrepo:
  subdir:   "deps/nats.c"
  merged:   "66cec7f"
upstream:
  origin:   "https://github.com/nats-io/nats.c.git"
  branch:   "v3.6.1"
  commit:   "66cec7f"
git-subrepo:
  version:  "0.4.6"
  commit:   "b8b46501e"
2023-08-15 00:21:33 -07:00

243 lines
14 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.6"/>
<title>NATS C Client with JetStream and Streaming support: jsSubOptions Struct Reference</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.6.1</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.6 -->
<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('structjs_sub_options.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="#pub-attribs">Public Attributes</a> &#124;
<a href="structjs_sub_options-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">jsSubOptions Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
</div><!--header-->
<div class="contents">
<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a856a6af4a7ff5aa2e736338091e69484"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_sub_options.html#a856a6af4a7ff5aa2e736338091e69484">Stream</a></td></tr>
<tr class="memdesc:a856a6af4a7ff5aa2e736338091e69484"><td class="mdescLeft">&#160;</td><td class="mdescRight">If specified, the consumer will be bound to this stream name. <br /></td></tr>
<tr class="separator:a856a6af4a7ff5aa2e736338091e69484"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7aa5b8439ed288b858943f28c291cb36"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_sub_options.html#a7aa5b8439ed288b858943f28c291cb36">Consumer</a></td></tr>
<tr class="memdesc:a7aa5b8439ed288b858943f28c291cb36"><td class="mdescLeft">&#160;</td><td class="mdescRight">If specified, the subscription will be bound to an existing consumer from the <code>Stream</code> without attempting to create. <br /></td></tr>
<tr class="separator:a7aa5b8439ed288b858943f28c291cb36"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf4b620d112a31f51a20389c5405805d"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_sub_options.html#aaf4b620d112a31f51a20389c5405805d">Queue</a></td></tr>
<tr class="memdesc:aaf4b620d112a31f51a20389c5405805d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Queue name for queue subscriptions. <br /></td></tr>
<tr class="separator:aaf4b620d112a31f51a20389c5405805d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a21a905c49dfab61729d8674702d196b2"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_sub_options.html#a21a905c49dfab61729d8674702d196b2">ManualAck</a></td></tr>
<tr class="memdesc:a21a905c49dfab61729d8674702d196b2"><td class="mdescLeft">&#160;</td><td class="mdescRight">If true, the user will have to acknowledge the messages. <br /></td></tr>
<tr class="separator:a21a905c49dfab61729d8674702d196b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acab25d71a2efe26bb3b084071435c2b5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_sub_options.html#acab25d71a2efe26bb3b084071435c2b5">Config</a></td></tr>
<tr class="memdesc:acab25d71a2efe26bb3b084071435c2b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Consumer configuration. <br /></td></tr>
<tr class="separator:acab25d71a2efe26bb3b084071435c2b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a95c5d2db8ca97d644042d436de119be4"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_sub_options.html#a95c5d2db8ca97d644042d436de119be4">Ordered</a></td></tr>
<tr class="memdesc:a95c5d2db8ca97d644042d436de119be4"><td class="mdescLeft">&#160;</td><td class="mdescRight">If true, this will be an ordered consumer. <br /></td></tr>
<tr class="separator:a95c5d2db8ca97d644042d436de119be4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>JetStream subscribe options.</p>
<p>These are options that you can provide to JetStream subscribe APIs.</p>
<p>The common usage will be to initialize a structure on the stack by calling <a class="el" href="group__js_sub_group.html#ga472adb949d1af9d8f07bda99f5d7f3f8" title="Initializes a subscribe options structure.">jsSubOptions_Init</a>. Note that strings are owned by the application and need to be valid for the duration of the API call this object is passed to.</p>
<dl class="section note"><dt>Note</dt><dd>It is the user responsibility to free the strings if they have been allocated.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_sub_group.html#ga472adb949d1af9d8f07bda99f5d7f3f8" title="Initializes a subscribe options structure.">jsSubOptions_Init</a> </dd></dl>
</div><h2 class="groupheader">Member Data Documentation</h2>
<a id="a856a6af4a7ff5aa2e736338091e69484" name="a856a6af4a7ff5aa2e736338091e69484"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a856a6af4a7ff5aa2e736338091e69484">&#9670;&#160;</a></span>Stream</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char* jsSubOptions::Stream</td>
</tr>
</table>
</div><div class="memdoc">
<p>If specified, the library will only bind to this stream, otherwise, the library communicates with the server to get the stream name that has the matching subject given to the <a class="el" href="group__js_sub_group.html#gaa686c6efd84ef963de1925108e896515" title="Create an asynchronous subscription.">js_Subscribe</a> family calls. </p>
</div>
</div>
<a id="a7aa5b8439ed288b858943f28c291cb36" name="a7aa5b8439ed288b858943f28c291cb36"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7aa5b8439ed288b858943f28c291cb36">&#9670;&#160;</a></span>Consumer</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char* jsSubOptions::Consumer</td>
</tr>
</table>
</div><div class="memdoc">
<p>If specified, the <a class="el" href="group__js_sub_group.html#gaa686c6efd84ef963de1925108e896515" title="Create an asynchronous subscription.">js_Subscribe</a> family calls will only attempt to create a subscription for this matching consumer.</p>
<p>That is, the consumer should exist prior to the call, either created by the application calling <a class="el" href="group__js_assets_group.html#gaf2efb63db150e782d9007090b49d4115" title="Adds a JetStream consumer.">js_AddConsumer</a> or it should have been created with some other tools such as the NATS cli. </p>
</div>
</div>
<a id="aaf4b620d112a31f51a20389c5405805d" name="aaf4b620d112a31f51a20389c5405805d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaf4b620d112a31f51a20389c5405805d">&#9670;&#160;</a></span>Queue</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char* jsSubOptions::Queue</td>
</tr>
</table>
</div><div class="memdoc">
<p>If specified, the low level NATS subscription will be a queue subscription, which means that the load on the delivery subject will be balanced across multiple members of the same queue group.</p>
<p>This makes sense only if the delivery subject in the <code>Config</code> field of <a class="el" href="structjs_sub_options.html">jsSubOptions</a> is the same for the members of the same group.</p>
<p>When no <code>Durable</code> name is specified in the <code>Config</code> block, then the queue name will be used as the consumer's durable name. In this case, the queue name cannot contain the character ".". </p>
</div>
</div>
<a id="a21a905c49dfab61729d8674702d196b2" name="a21a905c49dfab61729d8674702d196b2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a21a905c49dfab61729d8674702d196b2">&#9670;&#160;</a></span>ManualAck</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool jsSubOptions::ManualAck</td>
</tr>
</table>
</div><div class="memdoc">
<p>This has meaning only for asynchronous subscriptions, and only if the consumer's acknowledgment mode is other than <a class="el" href="group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873afd91fe31cf57c68863ca3090b07c296c" title="Requires no acks for delivered messages.">js_AckNone</a>.</p>
<p>For asynchronous subscriptions, the default behavior is for the library to acknowledge the message once the user callback returns.</p>
<p>This option allows you to take control of when the message should be acknowledged. </p>
</div>
</div>
<a id="acab25d71a2efe26bb3b084071435c2b5" name="acab25d71a2efe26bb3b084071435c2b5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acab25d71a2efe26bb3b084071435c2b5">&#9670;&#160;</a></span>Config</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a> jsSubOptions::Config</td>
</tr>
</table>
</div><div class="memdoc">
<p>This allows the user to fully configure the JetStream consumer. </p>
</div>
</div>
<a id="a95c5d2db8ca97d644042d436de119be4" name="a95c5d2db8ca97d644042d436de119be4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a95c5d2db8ca97d644042d436de119be4">&#9670;&#160;</a></span>Ordered</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool jsSubOptions::Ordered</td>
</tr>
</table>
</div><div class="memdoc">
<p>This will create a fifo ephemeral consumer for in order delivery of messages. There are no redeliveries and no acks. Flow control and heartbeats are required and set by default, but the heartbeats value can be overridden in the consumer configuration. </p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
</ul>
</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="navelem"><a class="el" href="structjs_sub_options.html">jsSubOptions</a></li>
<li class="footer">NATS.IO Supported By Synadia Communications Inc.
<a href="http://www.nats.io">
</a></li>
</ul>
</div>
</body>
</html>