<trclass="memdesc:ga17d42bf9a4fa39470561a1a668e6b4a2"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates a queue subscription. <br/></td></tr>
<p>Expresses interest in the given subject. The subject can NOT have wildcards. Messages will be delivered to the associated <aclass="el"href="group__callbacks_group.html#gaf7456e37fa14f1834d9048d3789e9409"title="Callback used to deliver messages to the application.">stanMsgHandler</a>.</p>
<dlclass="section warning"><dt>Warning</dt><dd>See warning about connecting to a NATS Server v2.2.0+ in <aclass="el"href="group__stan_conn_mgt_group.html#ga35e0e6e5e3b7f3818a3ac3600efb8f8f"title="Connects to a NATS Streaming Server using the provided options.">stanConnection_Connect()</a>.</dd></dl>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">sub</td><td>the location where to store the pointer to the newly created <aclass="el"href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8"title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
<tr><tdclass="paramname">sc</td><td>the pointer to the <aclass="el"href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec"title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
<tr><tdclass="paramname">channel</td><td>the channel this subscription is created for. </td></tr>
<tr><tdclass="paramname">cb</td><td>the <aclass="el"href="group__callbacks_group.html#gaf7456e37fa14f1834d9048d3789e9409"title="Callback used to deliver messages to the application.">stanMsgHandler</a> callback. </td></tr>
<tr><tdclass="paramname">cbClosure</td><td>a pointer to an user defined object (can be <code>NULL</code>). See the <aclass="el"href="group__callbacks_group.html#gaf7456e37fa14f1834d9048d3789e9409"title="Callback used to deliver messages to the application.">stanMsgHandler</a> prototype. </td></tr>
<tr><tdclass="paramname">options</td><td>the optional to further configure the subscription. </td></tr>
<p>Creates a queue subscriber on the given channel. All subscribers with the same queue name will form the queue group and only one member of the group will be selected to receive any given message asynchronously.</p>
<dlclass="section warning"><dt>Warning</dt><dd>See warning about connecting to a NATS Server v2.2.0+ in <aclass="el"href="group__stan_conn_mgt_group.html#ga35e0e6e5e3b7f3818a3ac3600efb8f8f"title="Connects to a NATS Streaming Server using the provided options.">stanConnection_Connect()</a>.</dd></dl>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">sub</td><td>the location where to store the pointer to the newly created <aclass="el"href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8"title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
<tr><tdclass="paramname">sc</td><td>the pointer to the <aclass="el"href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec"title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
<tr><tdclass="paramname">channel</td><td>the channel name this subscription is created for. </td></tr>
<tr><tdclass="paramname">queueGroup</td><td>the name of the group. </td></tr>
<tr><tdclass="paramname">cb</td><td>the <aclass="el"href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe"title="Callback used to deliver messages to the application.">natsMsgHandler</a> callback. </td></tr>
<tr><tdclass="paramname">cbClosure</td><td>a pointer to an user defined object (can be <code>NULL</code>). See the <aclass="el"href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe"title="Callback used to deliver messages to the application.">natsMsgHandler</a> prototype. </td></tr>
<tr><tdclass="paramname">options</td><td>the optional options to further configure this queue subscription. </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.