问题描述
我正在使用tomcat作为网络服务器.计划使用活动mq进行消息传递.刚刚开始学习jms和activeMQ.通过 https://activemq.apache.org/getting-started.html 走了.我所拥有的是活跃的mq带有自己的网站服务器(可能是不确定的Apache).我的问题是,如果我想使用现有的tomcat服务器而不是安装该怎么办?新服务器用于活动MQ.有可能吗?
I am using tomcat as webserver. Planning to use active mq for messaging purpose. Just started learning about jms and activeMQ.Gone thru https://activemq.apache.org/getting-started.html. What i have got is active mq comes with its own webserver(probably apache IS not sure). My question is what if I want to use existing tomcat server instead of installingnew server for active mq. Is it possible?
更新:我认为我可以使用 https://activemq .apache.org/tomcat.html
UPDATE: i think i can itegrate existing tomcat with https://activemq.apache.org/tomcat.html
推荐答案
是的,Apache ActiveMQ是轻量级代理,因此您可以将其作为WAR文件部署在Apache Tomcat中.或尝试使用AcitveMQ随附的Apache TomEE.
Yes Apache ActiveMQ is a light-weight broker, so you can deploy it in Apache Tomcat as a WAR file. Or try Apache TomEE which comes out of the box with AcitveMQ.
http://tomee.apache.org/apache-tomee.html
如果将ActiveMQ部署为WAR文件,则它不附带其自己的Web服务,而是Jetty作为其Web服务器附带的ActiveMQ的独立发行版.您只需要在嵌入了ActiveMQ的WAR文件中包括Jetty.
If you deploy ActiveMQ as a WAR file then it does not come with its own web service, its only the standalone distribution of ActiveMQ that comes with Jetty as its web server. You just don't need to include Jetty in your WAR file with ActiveMQ embedded.
在Apache Camel,我们有一个带有ActiveMQ和Camel作为WAR文件的WAR文件的示例,您可以在Tomcat中部署它.您可以看一下,只需从示例中删除Camel:
At Apache Camel we have an example of a WAR file with ActiveMQ and Camel as a WAR file you can deploy in Tomcat. You can take a look, and just remove Camel from the example:
http://camel.apache.org/activemq-camel-tomcat.html
这篇关于将现有的tomcat服务器与Active MQ集成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!