1

This scenario seems pretty ordinary, and yet, strangely, messaging systems (like Google Cloud PubSub and Task Queues and ActiveMQ) do not seem to support it -- they assume that topics/queues are long-lived.

  • A frontend webapp server sends a request to a backend server.
  • The backend server replies to this request with "expect to receive the messages on channel X" (The terminology in the async messaging system might be "queue" or "topic" rather than "channel".)
  • The backend server pumps out results onto X every few seconds for about 2 minutes.
  • The frontend server polls channel X to get these results.

So, the channel needs to exist for just the 2 minutes.

Am I misunderstanding how to do this? What is the right design approach?

  • I think rabbitMQ has randomly named temporary queues for this kind of RPC call. But it has a exchange setup and is particularly nice about such things – Ewan Jan 24 '18 at 14:17
  • Why do you think Active MQ doesn't support this? So the client side creates a consumer on a temporary queue as follows... – JimmyJames Jan 24 '18 at 14:26
  • @JimmyJames "Why do you think Active MQ doesn't support this" Just because of what I read at that link, which I guess is wrong. Thank you! – Joshua Fox Jan 24 '18 at 14:30
  • That thread seems to be more about the overhead around queue creation. It should not be an issue with what you plan to do. – JimmyJames Jan 24 '18 at 14:43
4

ActiveMQ does support this and it's a general feature of JMS. Here's a link pointing to a way of doing this.

I can't find the specific documentation at the moment but my recollection is that you can set up general queue configurations using wildcards like FOO.* Then you can write to FOO.BAR and ActiveMQ will create it. It will exist as long as there are unread messages on it. Once it is empty it will disappear after a timeout passes.

  • Thank you. Google PubSub and Task Queues apparently do not support short-lived queues (topics) and have a limit of 10K, but I see now that other systems do not have these issues. – Joshua Fox Jan 24 '18 at 19:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.