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

Support for REDIS ZSET #56

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Conversation

amaury-d
Copy link

@amaury-d amaury-d commented Feb 7, 2017

This commit adds support for ZSET queues in REDIS with data_type sortedset.
Batch is supported.

Score of the message is based on output (see logstash-output-redis).

The pull request adds the following option to the configuration:

  • priority_reverse boolean, default false, pop high score items
    first

Usage example:

    input {
    	redis {
		host => "127.0.0.1"
		port => 6379
		data_type => "sortedset"
		key => "syslog"
		priority_reverse => true
	}
    }

=> Il will pop from the sortedset with the key syslog the messages with the higher scores first

Thanks for contributing to Logstash! If you haven't already signed our CLA, here's a handy link: https://www.elastic.co/contributor-agreement/

This commit adds support for ZSET queues in REDIS with data_type 'list'.
Batch is supported.

Score of the message is based on output (see logstash-output-redis).

The commit adds the following options to the configuration:
* **priority**: *boolean*, default false, enable priority mode
* **priority_reverse *boolean*, default false, pop high score items
first

Usage example:
    input {
    	redis {
		host => "127.0.0.1"
		port => 6379
		data_type => "list"
		key => "syslog"
		priority => "syslog"
		priority_reverse => true
	}
    }
@amaury-d
Copy link
Author

amaury-d commented Feb 7, 2017

This pull request is linked to logstash-plugins/logstash-output-redis#46

@amaury-d amaury-d changed the title Support for REDIS priority queues Support for REDIS ZSET Feb 27, 2017
@untergeek
Copy link

@amaury-d Can you please add some rspec tests for these changes? This is a rather significant update and some tests are absolutely necessary.

@amaury-d
Copy link
Author

amaury-d commented Mar 2, 2017

@untergeek Sure, i'll work on it and update the pull request

@andrewvc
Copy link
Contributor

@amaury-d any updates here on adding those specs? We'd love to merge this :)

@amaury-d
Copy link
Author

amaury-d commented May 9, 2017 via email

@amaury-d
Copy link
Author

Hi @untergeek @andrewvc ,

rspec tests and supplementary documentation have been added to pull requests (input and output).

@tandara0
Copy link

tandara0 commented Jun 8, 2020

I really want it to support sortedset data_type.
Please merge this to master.

@tandara0
Copy link

Can I resolved the conflicts and merge the code to the master?

@amaury-d
Copy link
Author

@tandara0 That's fine for me. This PR seems to have been long forgotten and I'm happy if it can be useful to someone else.

Therefore, I'm not sure how you can work on this PR on github.

@tandara0
Copy link

@tandara0 That's fine for me. This PR seems to have been long forgotten and I'm happy if it can be useful to someone else.

Therefore, I'm not sure how you can work on this PR on github.

Thanks. I will try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants