이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 8. VM Transport


Abstract

The VM transport allows clients to connect to each other inside the Java Virtual Machine (JVM) without the overhead of network communication.
The URI used to specify the VM transport comes in two flavors to provide maximum control over how the embedded broker is configured:
  • simple—specifies the name of the embedded broker to which the client connects and allows for some basic broker configuration
  • advanced—uses a broker URI to configure the embedded broker

8.1. Simple VM URI Syntax

URI syntax

The simple VM URI is used in most situations. It allows you to specify the name of the embedded broker to which the client will connect. It also allows for some basic broker configuration.
Example 8.1, “Simple VM URI Syntax” shows the syntax for a simple VM URI.

Example 8.1. Simple VM URI Syntax

vm://BrokerName?TransportOptions
  • BrokerName specifies the name of the embedded broker to which the client connects.
  • TransportOptions specifies the configuration for the transport. They are specified in the form of a query list. Table 8.2, “VM Transport Options” lists the available options.

Broker options

In addition to the transport options listed in Table 8.2, “VM Transport Options”, the simple VM URI can use the options described in Table 8.1, “VM Transport Broker Configuration Options” to configure the embedded broker.
Table 8.1. VM Transport Broker Configuration Options
OptionDescription
broker.useJmxSpecifies if JMX is enabled. Default is true.
broker.persistentSpecifies if the broker uses persistent storage. Default is true.
broker.populateJMSXUserIDSpecifies if the broker populates the JMSXUserID message property with the sender’s authenticated username. Default is false.
broker.useShutdownHook Specifies if the broker installs a shutdown hook, so that it can shut down properly when it receives a JVM kill. Default is true.
broker.brokerNameSpecifies the broker name. Default is localhost.
broker.deleteAllMessagesOnStartupSpecifies if all the messages in the persistent store are deleted when the broker starts up. Default is false.
broker.enableStatisticsSpecifies if statistics gathering is enabled in the broker. Default is true.
brokerConfig Specifies an external broker configuration file. For example, to pick up the broker configuration file, activemq.xml, you would set brokerConfig as follows: brokerConfig=xbean:activemq.xml.
Important
The broker configuration options specified on the VM URI are only meaningful if the client is responsible for instantiating the embedded broker. If the embedded broker is already started, the transport will ignore the broker configuration properties.

Example

Example 8.2, “Basic VM URI” shows a basic VM URI that connects to an embedded broker named broker1.

Example 8.2. Basic VM URI

vm://broker1
Example 8.3, “Simple URI with broker options” creates and connects to an embedded broker that uses a non-persistent message store.

Example 8.3. Simple URI with broker options

vm://broker1?broker.persistent=false
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.