0
votes

I've got quite a bit of experience with tomcat+spring, but I haven't done anything with message queues. I'm wondering how people typically set up a stack that includes tomcat+jms (active mq)+spring in a production environment where producer and consumer are on different machines.

It seems natural to put the producer in a stripped down spring-mvc app, i.e. take the request body from the http request, do some validation, and post to the queue. If the consumer is on the same machine I can imagine a simple setup where the consumer bean is instantiated in the same spring container and it just executes async from the request.

But if the consumer is on a different box, how is it typically managed? Is it just a command line java program running a spring container (and probably daemonized somehow)? Or is it typically run inside a tomcat container even though it likely serves no pages? Or some other way I'm not aware of?

1

1 Answers

0
votes

The way I've always used it is Tomcat = client, JBoss AS = server, although frankly I would avoid JBoss unless it is offers something else that you really need.

The "lightweight" (and far preferable, IMHO) approach would be another Tomcat instance with a Spring app running on it. Although it may not serve up any "public" pages, having an admin page or two would probably end up being invaluable for runtime monitoring and minor configuration adjustments.