<!-- Kamailio Pull Request Template -->
<!-- IMPORTANT: - for detailed contributing guidelines, read: https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md - pull requests must be done to master branch, unless they are backports of fixes from master branch to a stable branch - backports to stable branches must be done with 'git cherry-pick -x ...' - code is contributed under BSD for core and main components (tm, sl, auth, tls) - code is contributed GPLv2 or a compatible license for the other components - GPL code is contributed with OpenSSL licensing exception -->
#### Pre-Submission Checklist <!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply --> <!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above--> <!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list --> - [x] Commit message has the format required by CONTRIBUTING guide - [x] Commits are split per component (core, individual modules, libs, utils, ...) - [x] Each component has a single commit (if not, squash them into one commit) - [x] No commits to README files for modules (changes must be done to docbook files in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change - [ ] Small bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist: <!-- Go over all points below, and after creating the PR, tick the checkboxes that apply --> - [ ] PR should be backported to stable branches - [x] Tested changes locally - [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description <!-- Describe your changes in detail -->
New Module to consume messages from NATS messaging system.
Initial Features:
- automatic reconnect with connected/disconnected event routes - connect to up to 10 NATS URLs - subscribe to any number of subjects - receive messages via event route
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2790
-- Commit Summary --
* nats: new nats message consumer module
-- File Changes --
A src/modules/nats/Makefile (16) A src/modules/nats/doc/Makefile (4) A src/modules/nats/doc/nats.xml (42) A src/modules/nats/doc/nats_admin.xml (207) A src/modules/nats/nats_mod.c (569) A src/modules/nats/nats_mod.h (99)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2790.patch https://github.com/kamailio/kamailio/pull/2790.diff
Thanks for the pull request. The kamailio-dev is a bot account, so i removed the review request. Just one quick question, in your code you state the copyright holder is "Weave Communication" but the module README (xml) states two other companies. Not sure if this is done intentional.
@eschmidbauer pushed 1 commit.
6078dbf6a7aa8eac8c3c4a57d939716f232799f5 nats: new nats message consumer module
Thanks for the pull request. The kamailio-dev is a bot account, so i removed the review request. Just one quick question, in your code you state the copyright holder is "Weave Communication" but the module README (xml) states two other companies. Not sure if this is done intentional.
Thanks for pointing that out! I pushed an update removing it.
Woohoo!
Thanks for the new module!
I find the name with potential to create confusion, being closed to `NAT` and we all know how popular that is and what it refers to in VoIP, but at the end I am fine with it given that it is the name of the external project. Maybe in the future if we end up with many distributed messaging platform modules, we can add a common prefix to all of them like we added for db module in the past.
Regarding the code, I noticed that shm/pkg_malloc() results are not checked for NULL, which will result in crashes on low/out of memory cases. @eschmidbauer has already git commit access, so I am fine to merge it and then push follow up commits for memory allocation checks.
I find the name with potential to create confusion, being closed to NAT and we all know how popular that is and what it refers to in VoIP, but at the end I am fine with it given that it is the name of the external project. Maybe in the future if we end up with many distributed messaging platform modules, we can add a common prefix to all of them like we added for db module in the past.
“msg_” “mbr_” “mbus_”
Adding a prefix is a good thing.
/O
On 28 Jun 2021, at 09:42, Daniel-Constantin Mierla notifications@github.com wrote:
Thanks for the new module!
I find the name with potential to create confusion, being closed to NAT and we all know how popular that is and what it refers to in VoIP, but at the end I am fine with it given that it is the name of the external project. Maybe in the future if we end up with many distributed messaging platform modules, we can add a common prefix to all of them like we added for db module in the past.
Regarding the code, I noticed that shm/pkg_malloc() results are not checked for NULL, which will result in crashes on low/out of memory cases. @eschmidbauer https://github.com/eschmidbauer has already git commit access, so I am fine to merge it and then push follow up commits for memory allocation checks.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kamailio/kamailio/pull/2790#issuecomment-869451310, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABO7UZKHS7YN5JFPHCLSAQ3TVARUZANCNFSM47MJ3QRQ.
Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Think the same, as we have already three modules implementing message queues:
- mqtt - rabbitmq - kazoo
I was thinking of “mq_” prefix, but this obviously do not fit well to the existing names.
Cheers,
Henning -- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.comhttps://gilawa.com/
From: sr-dev sr-dev-bounces@lists.kamailio.org On Behalf Of Olle E. Johansson Sent: Monday, June 28, 2021 1:10 PM To: Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org Subject: Re: [sr-dev] [kamailio/kamailio] nats: new nats message consumer module (#2790)
I find the name with potential to create confusion, being closed to NAT and we all know how popular that is and what it refers to in VoIP, but at the end I am fine with it given that it is the name of the external project. Maybe in the future if we end up with many distributed messaging platform modules, we can add a common prefix to all of them like we added for db module in the past. “msg_” “mbr_” “mbus_”
Adding a prefix is a good thing.
/O
On 28 Jun 2021, at 09:42, Daniel-Constantin Mierla <notifications@github.commailto:notifications@github.com> wrote:
Thanks for the new module! I find the name with potential to create confusion, being closed to NAT and we all know how popular that is and what it refers to in VoIP, but at the end I am fine with it given that it is the name of the external project. Maybe in the future if we end up with many distributed messaging platform modules, we can add a common prefix to all of them like we added for db module in the past. Regarding the code, I noticed that shm/pkg_malloc() results are not checked for NULL, which will result in crashes on low/out of memory cases. @eschmidbauerhttps://github.com/eschmidbauer has already git commit access, so I am fine to merge it and then push follow up commits for memory allocation checks. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/kamailio/kamailio/pull/2790#issuecomment-869451310, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABO7UZKHS7YN5JFPHCLSAQ3TVARUZANCNFSM47MJ3QRQ. _______________________________________________ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.orgmailto:sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Maybe q_
On Mon, Jun 28, 2021, 2:15 PM Henning Westerholt hw@skalatan.de wrote:
Think the same, as we have already three modules implementing message queues:
mqtt
rabbitmq
kazoo
I was thinking of “mq_” prefix, but this obviously do not fit well to the existing names.
Cheers,
Henning
--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com
*From:* sr-dev sr-dev-bounces@lists.kamailio.org *On Behalf Of *Olle E. Johansson *Sent:* Monday, June 28, 2021 1:10 PM *To:* Kamailio (SER) - Development Mailing List <sr-dev@lists.kamailio.org
*Subject:* Re: [sr-dev] [kamailio/kamailio] nats: new nats message consumer module (#2790)
I find the name with potential to create confusion, being closed to NAT and we all know how popular that is and what it refers to in VoIP, but at the end I am fine with it given that it is the name of the external project. Maybe in the future if we end up with many distributed messaging platform modules, we can add a common prefix to all of them like we added for db module in the past.
“msg_”
“mbr_”
“mbus_”
Adding a prefix is a good thing.
/O
On 28 Jun 2021, at 09:42, Daniel-Constantin Mierla < notifications@github.com> wrote:
Thanks for the new module!
I find the name with potential to create confusion, being closed to NAT and we all know how popular that is and what it refers to in VoIP, but at the end I am fine with it given that it is the name of the external project. Maybe in the future if we end up with many distributed messaging platform modules, we can add a common prefix to all of them like we added for db module in the past.
Regarding the code, I noticed that shm/pkg_malloc() results are not checked for NULL, which will result in crashes on low/out of memory cases. @eschmidbauer https://github.com/eschmidbauer has already git commit access, so I am fine to merge it and then push follow up commits for memory allocation checks.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kamailio/kamailio/pull/2790#issuecomment-869451310, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABO7UZKHS7YN5JFPHCLSAQ3TVARUZANCNFSM47MJ3QRQ .
Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Merged #2790 into master.