質問

IronMQ supports push queues, but the example Heroku push queue subscriber is implemented as a web dyno. This feels awkward, because I need a single Heroku project to use web dynos that serve web requests, and worker dynos that process time-consuming needs. That's how Heroku is designed.

The IronMQ API indicates that the push queue subscriber should be accessible via a publicly-accessible URL; that's why web dynos are necessary.

Is there any (clean) way to get IronMQ push queues publishers and subscribers within a single Heroku project?

Is there another queue service that does support something like this (even long-polling subscribers would work)?

役に立ちましたか?

解決

If you wanted to use IronMQ from a non-web-accessible server, my best advice would be to use pull queues. Start up your worker dyno, and have it pull down any messages available every X seconds. With 10 million requests free, you're only using 26% of the free quota if you check for messages every second.

If you still wanted to do push queues and had a TCP port listening on the worker dyno, you could always use the push queues and have each message start up a worker on IronWorker that translates the message into a TCP connection instead of an HTTP connection.

Hope that helps!

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top