<p></p>
<p dir="auto"><a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/smititelu/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/smititelu">@smititelu</a> I made some changes to better handle the NATS connections and share the connections between publishes and subscribers. This eliminates duplicate connection handling within the module and allows it to extend into independent connection handling (e.g. add/remove/label nats connections while kamailio is running) later.<br>
I've submitted the PR to your fork <a href="https://github.com/smititelu/kamailio/pull/2/files">here</a> so you can review and test.<br>
It's not a common implementation to specify a nats url per publish request therefore the message publish will be sent to a single nats connection (which can container up to 10 nats urls). Also, I did not see the benefit of mixing queue group subjects with publish requests, therefore, I thought it best to also specify subject on publish request. I think there is more to be done here but mostly around testing and fixup of publish parameters.<br>
Please let me know your thoughts, and if you don't mind, let's move this conversation to your fork so we can discuss best path forward before submitting the code to kamailio repo.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/2915#issuecomment-968294247">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZM3NLIR5ZPQX7CERKTUL642FANCNFSM5HI6CVXQ">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/ABO7UZNP4Z3HGZ42R5ECCV3UL642FA5CNFSM5HI6CVX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHG3P6ZY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/pull/2915#issuecomment-968294247",
"url": "https://github.com/kamailio/kamailio/pull/2915#issuecomment-968294247",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>