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

Are fanout supported? #22

Closed
robfrank opened this issue Nov 5, 2015 · 5 comments
Closed

Are fanout supported? #22

robfrank opened this issue Nov 5, 2015 · 5 comments

Comments

@robfrank
Copy link

robfrank commented Nov 5, 2015

Are fanout queues supported?
We are heavy users of kestrel and this project looks very interesting, but we use a lot of fanout queues.

@bogdanovich
Copy link
Owner

Fanout queues are not supported now, but it's fairly easy to add this feature.
However, I'm working on "multiple consumer groups" feature and it's almost done.

You can check v0.5 branch. The idea is to be able to read any queue multiple times.
Usage: get <queue>:<consumer_group>
get work:my_consumer_group
get work:1

It will create a consumer group or durable cusor so you can read the source queue multiple times. It's lightweight and doesn't multiply disk space usage.

What is your fanout queues use case?
Is it really complex? or you can get benefit from multiple consumer groups feature?

@robfrank
Copy link
Author

robfrank commented Nov 5, 2015

We use fanouts for different purpose; given a base queue named messages:

  • test: fetch messages with a test/pre-production sw messages+TEST
  • backup: messages+WEEKLY_BACKUP
  • fetch with multiple sw component same data: messages+product_1, messages+product_2

We are a java-shop and we use memcached client to access Kestrel servers. We have some clients written in c#.
If you implement fanouts, siberite could be a replacement for kestrel as is. If consumer group is only a suffix for the queue's name, it's quite the same. I don't understand how can you consider expired an item in the queue, because you can't know how many clients are part of the group.

@bogdanovich
Copy link
Owner

I don't understand how can you consider expired an item in the queue, because you can't know how many clients are part of the group.

  1. When you read an item in a usual way: get messages, an item gets expired and deleted.
  2. When you read an item using consumer group: get messages:cgroup, a durable cursor cgroup gets initialized and with every read it shifts forward without deleting any messages in the source queue. So the source queue remains untouched. Number of consumer groups per queue is not limited.
  3. You can start reading from the source queue directly again and it will start deleting messages. Any existing consumer group cursor that internally points to already deleted message will catch up and will start serving messages from the current source queue head.

Maybe consumer group term is confusing and I should start using durable cursor instead.

PS. I will add fanout queues support to the roadmap.
The implementation is pretty much straightforward.

@robfrank
Copy link
Author

robfrank commented Nov 5, 2015

Ok, fanout are different. Yes, open a fanout will double the space, but it allows to fetch from main o fanouts independently.
Thank you very much for your support.`

@bogdanovich
Copy link
Owner

They are supported now.

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

2 participants