TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Good pub/sub setup for personal projects?

14 点作者 rschachte将近 3 年前
I’m messing around with a single node k8s homelab I’m running for fun side projects and micro service development.<p>I’ve done a lot of work with Kafka, but it’s pretty heavy and I really just want a decent pub&#x2F;sub queue setup between services that would be somewhat reliable.<p>Is there anything you’d recommend? Open to thoughts on just using Postgres as a queue as well.

8 条评论

boloust将近 3 年前
At one end of the spectrum: ZeroMQ[1]. No broker to run, and everything can stay within your local network. Just add the library to your microservices and expose a port. It gives you a socket interface with well-engineered queuing primitives. It&#x27;s enough for most side projects in its simplest form, while also giving you the flexibility to implement a huge number of distributed queuing patterns.<p>At the other end of the spectrum: just use a managed queue from your preferred big cloud provider. All are reliable enough for this use case, and the cost for most projects would be zero or negligible.<p>[1]: <a href="https:&#x2F;&#x2F;zeromq.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;zeromq.org&#x2F;</a>
rektide将近 3 年前
Not entirely a real suggestion, but if you want really ultra-fun &amp; easy, patchbay is the most awesome, simplest, easiest-to-use &amp; most versatile&#x2F;multi-purpose http service for relaying things around&#x2F;queuing that I know.<p>Atm it&#x27;s all in-memory, afaik. There are go &amp; node.js implementations, which I hope some-day we add persistence to.<p>I&#x27;m still working on k8s Persistent Volumes, but in terms of bigger&#x2F;better software, I hope soon-ish to have a Pulsar Operator[2] going. Kafka is very very exacting &amp; specific, inflexible, but Pulsar&#x27;s architecture seems much more general &amp; flexible, capable of things like great geo-distribution by virtue of it&#x27;s underlying Bookkeeper storage layer. It&#x27;d be my production go-to for any pubsub details.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;patchbay-pub" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;patchbay-pub</a> <a href="https:&#x2F;&#x2F;patchbay.pub&#x2F;" rel="nofollow">https:&#x2F;&#x2F;patchbay.pub&#x2F;</a> <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=21639066" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=21639066</a> (362 points, 3 years ago, 79 comments)<p>[2] <a href="https:&#x2F;&#x2F;docs.streamnative.io&#x2F;operators&#x2F;pulsar-operator&#x2F;pulsar-operator-install" rel="nofollow">https:&#x2F;&#x2F;docs.streamnative.io&#x2F;operators&#x2F;pulsar-operator&#x2F;pulsa...</a>
remram将近 3 年前
Redis is extremely easy (single binary), though that might not be super compelling if you can run containers. RabbitMQ is good too and has additional features like automatic requeueing if the client stops before acknowledging (and more complex routing rules etc). Both have clients in many languages.
fendy3002将近 3 年前
uhm, rabbitMQ?<p>the problem is just Kafka being heavy?
评论 #32078242 未加载
评论 #32077942 未加载
pramsey将近 3 年前
I had a good time with the pq module for a pgsql&#x2F;python [1] queue. There&#x27;s a certain brutal simplicity to just having one persistent process, the database, to manage.<p>[1] <a href="https:&#x2F;&#x2F;pypi.org&#x2F;project&#x2F;pq&#x2F;" rel="nofollow">https:&#x2F;&#x2F;pypi.org&#x2F;project&#x2F;pq&#x2F;</a>
winrid将近 3 年前
Why do you want to use a queue between services for a personal project? Just use RPC or similar?<p>Unless you want to play with queues... otherwise I would use the database, and add redis or rabbitmq later.
wdb将近 3 年前
Maybe Redpanda or Redis pub&#x2F;sub?
joshxyz将近 3 年前
redis streams are cool