防火墙后面的 JMS 客户端
我有以下场景: 包含命令的消息必须发送到使用消费者互联网连接连接到互联网的消费者/客户端。所以这意味着运行客户端的系统不能直接从互联网访问。命令服务器位于面向 Internet 的服务器上。
由于需要可靠的连接,我考虑使用 JMS 队列。命令服务器将托管消息传递组件并提供必要的队列。这是我的问题。客户端是否需要可从互联网访问,例如,它是否会打开用于将消息从服务器推送到客户端的端口?
如果是这样的话,是否有其他模型可以避免这种行为?例如,我可以考虑打开一个从客户端到服务器的持久 HTTP 连接,用于推送消息(COMET)。然而,我真的很想保留 JMS 提供的抽象。
作为 B 计划,您能推荐一些好的替代方案吗?
I have following scenario:
Messages containing commands have to be send to a consumer / client which is connected to the internet using consumer Internet connections. So this means that the system running the client is not directly accessible from the Internet. The command server is located on an Internet facing server.
As a reliable connection is needed I thought about using JMS queues. The command server would be hosting the messaging component and will offer the necessary queues. Here's my question. Does the client need to be accessible from the Internet, e.g. will it open ports which are used to push messages from the server to the client?
If that's the case, are there any other models which avoid this behavior? E.g. I can think of opening a long lasting HTTP connection from the client to the server which is used in case of messages being pushed (COMET). However, I would really like to keep the abstraction JMS provides.
As a plan B could you recommend any good alternatives?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通常是客户端建立与服务器的连接,因此客户端可以位于防火墙后面。
如果您需要反转方向或更好地保护您的 JMS 服务器,您始终可以在防火墙后面的计算机和命令服务器之间设置 VPN 样式的连接。 OpenVPN 是一个强大、易于管理且安全的选项的示例。因为您可以控制建立链接的方向,并且可以保护 JMS 流量和通常公开的 JMS 服务器端口,所以我认为这可能是一个很好的解决方案。
您使用什么 JMS 产品?
Normally it's the client who sets up the connection with the server, so the client can be behind a firewall.
Should you need to reverse the direction or better protect your JMS server you could always set up a VPN style connection between the computer that's behind the firewall and the command server. OpenVPN is an example of a robust, easy to manage and secure option. Because you can control the direction in which the link is set up, and you protect the JMS traffic and the normally exposed JMS server port I think that may be a good solution.
What JMS product do you use?