#### 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 Adds Publish function to NATS module. You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2978
-- Commit Summary --
* NATS: add new function `nats_publish()`
-- File Changes --
M src/modules/nats/Makefile (2) A src/modules/nats/defs.h (40) M src/modules/nats/doc/nats_admin.xml (23) M src/modules/nats/nats_mod.c (44) M src/modules/nats/nats_mod.h (17) A src/modules/nats/nats_pub.c (157) A src/modules/nats/nats_pub.h (46)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2978.patch https://github.com/kamailio/kamailio/pull/2978.diff
@miconda approved this pull request.
Fine to merge it from my point of view, only one comment as I noticed in the makefile it needs both libuv and libevent. I thought they are alternative for each other, not expecting to be needed at the same time, but maybe they are required in this manner because of dependencies.
I've basically tested this PR locally and works good. Nice work!
Thanks, Stefan
Fine to merge it from my point of view, only one comment as I noticed in the makefile it needs both libuv and libevent. I thought they are alternative for each other, not expecting to be needed at the same time, but maybe they are required in this manner because of dependencies.
@miconda thank you for the feedback. I agree with you, we should probably not use two different eventing libraries. I will work on switching to libuv for the publish worker and submit a new PR.
@eschmidbauer pushed 1 commit.
999bc370282f80cef6d85e7fbb54aff6fca32e37 NATS: add new function `nats_publish()`
@eschmidbauer pushed 1 commit.
ce21bd8a0cd4c74227bc43bef2bdd8f4a8006171 NATS: add new function `nats_publish()`
@miconda @smititelu I've updated this PR to use libuv _only_ and added parameter `num_publish_workers` which allows you to have N number of publish workers. Thanks!
@eschmidbauer - fine to merge from my point of view.
Merged #2978 into master.