Implementing queue route
Closed this issue · 0 comments
bogh commented
I think we should still implement the queue'd route, not closing the channel immediately if the route is full.
At the moment we store only pointers in the channels which will make the buffer low in size and thus will save the disk, because closing the channel of the subscription, will require the subscription to fetch from the disk again, and if each subscription will fetch messages it will grown more in memory, cause each message in this case will represent different values in memory, there wont be a pointer to the same message. I think reducing the disk usage is a plus, and the queue'd route is easy to implement., already done some work in this direction.
EDIT
Outlining some benefits:
- The logic of delivering a message to the route channel goes inside the route
- The closing mechanism is inside the route also.
- We can decide using route params how the route will act, how much to buffer and if the channel should be closed in case of high buffer.
- The route will have a
deliver
method that will take care of storing the message in the queue and it will be non-blocking.
Any thoughts?