About pub-sub model

239 views
Skip to first unread message

Suman Patro

unread,
Aug 16, 2015, 2:39:37 AM8/16/15
to beanstalk-talk
1. Is publish-subscribe model supported in beanstalkd?
2. Can job queues be used as message queues and vice versa?.. State some of the few.
3. Can Beanstalkd be used as a message queue??

Jens Rantil

unread,
Aug 17, 2015, 7:26:33 AM8/17/15
to beanstalk-talk
Hi,


Den söndag 16 augusti 2015 kl. 08:39:37 UTC+2 skrev Suman Patro:
1. Is publish-subscribe model supported in beanstalkd?

Not explicitly, however you could always have a producer put multiple copies to different tubes if it knows who the consumers are. Do note, however, that this might be considered a hack.
 
2. Can job queues be used as message queues and vice versa?.. State some of the few.

Define message queue. You could always send messages but each task will only be consumed by one worker.
 
3. Can Beanstalkd be used as a message queue??

If "message queue" is what I described in 2), then yes.

Cheers,
Jens 

Suman patro

unread,
Aug 17, 2015, 12:16:45 PM8/17/15
to beansta...@googlegroups.com

Thank you so much.
But your 1st and 2nd answers conflict.
If copies can be given to multiple Consumers(1), then why a  copy can be consumed by a single consumer (2)..if u can please elaborate.
Sent from my Sony Xperia™ smartphone



---- Jens Rantil wrote ----
--
You received this message because you are subscribed to a topic in the Google Groups "beanstalk-talk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beanstalk-talk/y6rvlenH7P8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beanstalk-tal...@googlegroups.com.
To post to this group, send email to beansta...@googlegroups.com.
Visit this group at http://groups.google.com/group/beanstalk-talk.
For more options, visit https://groups.google.com/d/optout.

Jens Rantil

unread,
Aug 18, 2015, 8:14:24 AM8/18/15
to beansta...@googlegroups.com
Hi Suman,

You can manually publish a task ones per tube (for multiple tubes). A tube can in this case be a topic. However, this smells like a hack to me and you are probably better off with something closer to a message queue.

Cheers,
Jens
--
Want to communicate with me securely? You can find my PGP key here.

Suman patro

unread,
Aug 20, 2015, 3:22:06 PM8/20/15
to beansta...@googlegroups.com

Thank you so much... Jens... Your help is highly appreciated. I'll research and try and find stuffs too

Michael Barrow

unread,
Aug 20, 2015, 8:28:37 PM8/20/15
to beansta...@googlegroups.com
When you put a job into a tube, and a worker reserves it, it is the only worker that will ever see that job. There are a few exceptions, including:
1. if it fails to remove it from the tube prior to the timeout set for the job, beanstalkd will make the job available to another worker.
2. if the worker buries the job, it will remain in the tube, but in a buried state where it won't be available to be reserved without being kicked.

Implementing pub/sub using beanstalkd is possible, but will require a substantial amount of work in your codebase to implement the functionality.

You received this message because you are subscribed to the Google Groups "beanstalk-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beanstalk-tal...@googlegroups.com.

To post to this group, send email to beansta...@googlegroups.com.
Visit this group at http://groups.google.com/group/beanstalk-talk.
For more options, visit https://groups.google.com/d/optout.



--
michael at barrow dot me

"Do not anticipate trouble, or
worry about what may never happen.
Keep in the sunlight." -- B. Franklin

Suman Patro

unread,
Aug 22, 2015, 6:16:53 AM8/22/15
to beansta...@googlegroups.com

Thanks Michael

Reply all
Reply to author
Forward
0 new messages