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

Map floki commands to Redis commands #3

Open
arthurprs opened this issue Dec 12, 2015 · 0 comments
Open

Map floki commands to Redis commands #3

arthurprs opened this issue Dec 12, 2015 · 0 comments

Comments

@arthurprs
Copy link
Owner

This is what Floki does right now

RPUSH push one or more messages

RPUSH queue_name message1 [message2, ...]

Returns the number of messages inserted

HMGET get one or more messages

HMGET queue_name channel_name number_or_messages [long_pooling_timeout]

Returns an array with three items for each message. The first would be the id, the second is the ticket (for acknowledging, see bellow) and the third would be the message itself.
Note: Floki will return as soon as there's one message available

HMSET seeks the channel

HMGET queue_name channel_name TS|ID seek_timestamp|seek_id

Seeks the specified channel to the specified id or timestamp.

Note: Floki won't error if the id or timestamp is either in the future or is already gone from the underlying storage. If it's set to a non-existent past, gets will just return the first available message.

HDEL ack messages

HDEL queue_name channel_name ticket1 [ticket2, ...]

Acknowledge messages using their tickets. Returns the number of successful acknowledges.

MSET create queue/channel

MSET queue_name channel_name

Creates the specified queue and channels, will error if the queue already exists

DEL delete queue/channel

DEL queue_name [channel_name]

Deletes a channel, if specified, otherwise deletes the queue.

SREM purge queue/channel

SREM queue_name channel_name_or_*

Note: you can also use * as the channel name to purge all channels, effectively purging the entire queue and allowing all used disk space to be reclaimed.

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

No branches or pull requests

1 participant