地址行中的 vm 前缀是什么意思?
What does vm prefix mean in the address line?
我正在经历 Apache ActiveMQ example 并面对 vm
前缀如下:
ActiveMQConnectionFactory connectionFactory =
new ActiveMQConnectionFactory("vm://localhost");
这是什么意思?顺便说一下,当我连接到消息代理时,我基本上使用像 tcp://localhost:61616
.
这样的地址
VM 代表虚拟机。
它代表您连接的VM(虚拟机)。
您可以在他们的 docs 中阅读更多相关信息。
尽管 Rahul 是正确的,但我认为在答案中添加一些上下文是有意义的。
所以,vm代表虚拟机,这是Java中非常核心的概念。 Java 程序在虚拟机中执行。
有关您的特定 ActiveMQ 案例的更多信息,解释了 vm:// 和 tcp:// 之间的区别,可以阅读关于 here:
In the same JVM clients can then use the vm:// transport to connect to the embedded broker - whilst external clients can use the tcp:// protocol
我正在经历 Apache ActiveMQ example 并面对 vm
前缀如下:
ActiveMQConnectionFactory connectionFactory =
new ActiveMQConnectionFactory("vm://localhost");
这是什么意思?顺便说一下,当我连接到消息代理时,我基本上使用像 tcp://localhost:61616
.
VM 代表虚拟机。
它代表您连接的VM(虚拟机)。
您可以在他们的 docs 中阅读更多相关信息。
尽管 Rahul 是正确的,但我认为在答案中添加一些上下文是有意义的。
所以,vm代表虚拟机,这是Java中非常核心的概念。 Java 程序在虚拟机中执行。
有关您的特定 ActiveMQ 案例的更多信息,解释了 vm:// 和 tcp:// 之间的区别,可以阅读关于 here:
In the same JVM clients can then use the vm:// transport to connect to the embedded broker - whilst external clients can use the tcp:// protocol