Red Hat AMQ 6
As of February 2025, Red Hat is no longer supporting Red Hat AMQ 6. If you are using AMQ 6, please upgrade: Migrating to AMQ 7.Questo contenuto non è disponibile nella lingua selezionata.
Chapter 5. Intra-JVM Connections
Abstract
Overview Copia collegamentoCollegamento copiato negli appunti!
Figure 5.1. Clients Connected through the VM Transport
Embedded brokers Copia collegamentoCollegamento copiato negli appunti!
- explicitly defining the broker in the application's configuration
- explicitly creating the broker using the Java APIs
- automatically when the first client attempts to connect to it using the VM transport
waitForStart
option or the create=false
option to manage how the VM transport determines when to create a new embedded broker.
Using the VM transport Copia collegamentoCollegamento copiato negli appunti!
- simpleThe 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 5.1, “Simple VM URI Syntax” shows the syntax for a simple VM URI.
Example 5.1. Simple VM URI Syntax
vm://BrokerName?TransportOptions
vm://BrokerName?TransportOptions
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 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. For details about the available options see the Connection Reference.ImportantThe 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.
- advancedThe advanced VM URI provides you full control over how the embedded broker is configured. It uses a broker configuration URI similar to the one used by the administration tool to configure the embedded broker.Example 5.2, “Advanced VM URI Syntax” shows the syntax for an advanced VM URI.
Example 5.2. Advanced VM URI Syntax
vm://(BrokerConfigURI)?TransportOptions
vm://(BrokerConfigURI)?TransportOptions
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - BrokerConfigURI is a broker configuration URI.
- TransportOptions specifies the configuration for the transport. They are specified in the form of a query list. For details about the available options see the Connection Reference.
Examples Copia collegamentoCollegamento copiato negli appunti!
broker1
.
Example 5.3. Basic VM URI
vm://broker1
vm://broker1
Example 5.4. Simple URI with broker options
vm://broker1?broker.persistent=false
vm://broker1?broker.persistent=false
Example 5.5. Advanced VM URI
vm:(broker:(tcp://localhost:6000)?persistent=false)?marshal=false
vm:(broker:(tcp://localhost:6000)?persistent=false)?marshal=false