[英]JMS within Tomcat: creation a queue per client?
I am trying to develop my own server as an web application with Tomcat. 我正在尝试使用Tomcat将自己的服务器开发为Web应用程序。 I would like to develop a system of push notifications (server->client(s)) and I saw that the principle of JMS is quite interesting for that.
我想开发一个推送通知系统(服务器->客户端),我发现JMS的原理对此非常有趣。 I already found some tutorial on Internet about how to use JMS/ActiveMQ on Tomcat (for instance: http://www.idanfridman.com/using-jms-in-tomcat/ ) .
我已经在Internet上找到了一些有关如何在Tomcat上使用JMS / ActiveMQ的教程(例如: http : //www.idanfridman.com/using-jms-in-tomcat/ )。 However, it seems that the creation of queues or topics has to be done manually from a xml file (conf/server.xml).
但是,似乎必须从xml文件(conf / server.xml)手动完成队列或主题的创建。 Some things do not seem clear to me.
有些事情对我而言似乎并不明确。 Indeed, i would like to know how the creation is exactly handled, if it is possible to create with a java code a queue/topic for each new client(s) (we don't send the same notitifications to every clients).
确实,我想知道如何正确处理创建操作,如果可以用Java代码为每个新客户创建队列/主题(我们不会向每个客户发送相同的通知)。 If it is the case, in that case it means that if I have 1000 clients then I have to create 1000 queue in order to handle the notifications of each client.
如果是这样,那么在这种情况下,这意味着如果我有1000个客户端,则必须创建1000个队列才能处理每个客户端的通知。
Thanks in adavance, 提前感谢,
S 小号
It's certainly possible to create them programmatically, but I doubt you want to use JMS
(or 1000 JMS queues) for your program. 当然可以通过编程方式创建它们,但是我怀疑您想为程序使用
JMS
(或1000个JMS队列)。
1000 clients also sounds like a lot for your situation. 1000个客户在您的情况下听起来也很多。 It seems to me you're looking for something like
WebSockets
instead of JMS
. 在我看来,您正在寻找
WebSockets
而不是JMS
类的东西。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.