Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message Subject could be dynamically picked from the message so that we can publish to multiple NATS Subjects #1

Closed
gdcrocx opened this issue Apr 6, 2019 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@gdcrocx
Copy link

gdcrocx commented Apr 6, 2019

Hi @remil1000,

Appreciate the work you have done on the logstash-input-nats_streaming plugin for Logstash. I have gone through the code and just a suggestion -

Do you see if the NATS subject could be picked up dynamically from the incoming message subject?

Feel free to share your comments. Thanks, once again.

George Davis.
https://www.georgedavis.co

@gdcrocx
Copy link
Author

gdcrocx commented Apr 6, 2019

With reference to the logstash-input-nats input plugin for Logstash by lliknart here (https://github.com/lliknart/logstash-input-nats/blob/master/lib/logstash/inputs/nats.rb), lliknart has made the acceptable subjects as an array.

Do you think we can use the same logic for your nats_streaming plugin?

@remil1000
Copy link
Owner

Hi @gdcrocx ,

I may handle this as a comma separated list of subjects
so for example subject => "sub1, sub2, sub3"
If I had to implement this multiple subjects setup I would still prefer separated logstash threads/pipelines for each subject to avoid some noisy neighbor side effects

Getting back to your first quetion, I'm not sure I'm understanding the "dynamic subject part"; remember this is a input plugin for NATS streaming (not pure NATS) so there is no support for subject name wildcard or hierarchy.

Please let me know if a simple list of sujbects would fit your need

@remil1000 remil1000 self-assigned this Apr 8, 2019
@remil1000 remil1000 added the enhancement New feature or request label Apr 8, 2019
@gdcrocx
Copy link
Author

gdcrocx commented Apr 10, 2019

Hi @remil1000,

Thank you so much for looking into it. Yes, adding an array list of subjects would solve the issue.

Something like this, I would assume

config :subjects, :validate => :array, :default => ["logstash"]

Do keep me posted on this issue and I can help test the changes.

Thanks, once again.

remil1000 pushed a commit that referenced this issue Apr 17, 2019
@remil1000
Copy link
Owner

implemented in branch feature/multiple-subjects and tagged 0.2.1

Could you try 0.2.1 to see if it fits your need ?

@gdcrocx
Copy link
Author

gdcrocx commented Apr 18, 2019

Hi @remil1000,

Checked the source code. Looks good. Will test tonight and keep you posted.

Any tips on why we are choosing to split strings rather than implementing an array of strings?

Thanks.

@remil1000
Copy link
Owner

remil1000 commented Apr 18, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants