Skip Navigation Links | |
Exit Print View | |
Oracle GlassFish Server Message Queue 4.5 Developer's Guide for Java Clients |
3. Message Queue Clients: Design and Features
4. Using the Metrics Monitoring API
Creating, Initializing and Starting an Embedded Broker
Creating a Broker Event Listener
Arguments to Specify When Initializing an Embedded Broker
Creating a Direct Connection to an Embedded Broker
Creating a TCP Connection to an Embedded Broker
Stopping and Shutting Down an Embedded Broker
Message Queue supports running a broker from within a Java client. Such a broker, called an embedded broker, runs in the same JVM as the Java client that creates and starts it.
Beyond operating like a normal standalone broker, an embedded broker offers the application in which it is embedded access to a special kind of connection called a direct mode connection. Direct mode connections are used just like ordinary connections, but they are much higher performing because they use in-memory transport instead of TCP. To specify a direct mode connection, the client specifies mq://localhost/direct as the broker address in the connection factory from which it subsequently creates the connection.
The following sections provide more information about creating and managing embedded brokers: