Apache Qpid : Restructuring Java Broker and Client Design
This page last changed on Jul 31, 2007 by rajith.
Proposed ArchitectureThe following diagram depicts the architecture for the client and broker.
______________________________________________
JMS for Client | Broker Logic
______________________|_______________________
Qpid Client API |
|
Qpid Layer Client | Qpid Layer Broker
______________________|_______________________
Invoker -- For out going
Delegate -- For incomming
Connection, Session, Channel
Communication Layer
______________________________________________
Invoker and DelegateInvoker and Delegate are generated classes that contains all the methods in the spec. Multi Version SupportTo tackle multi version support the following stratergy is used. interface Struct_A { public getX(String s); // AMQP 0-10 public getX(String s, int i); // AMQP 0-11 public getY(); // AMQP 0-10 public getZ(); // AMQP 0-11 } Struct_A_v0_10 implements Struct_A { public getX(String s){.... } public getY(){.... } } Struct_A_v0_11 implements Struct_A { public getX(String s){.... } public getX(String s,int i){.... } public getY(){.... } public getZ(){.... } } Client code can still use v0-10 methods with a v0-11 library and compile as the Interface and existing methods have not changed. Changes are handled by adding the new or modified methods. Note this strategy is only envisaged for incremental changes. A major change in spec would need substantial code changes. Qpid Client APIIs a thin wrapper around the Invoker plus a few convinence methods.
Invoker
{
// All the spec methods
}
CommonSession extends Invoker { // convinience methods for messaging header(Header h); data(byte[] src); endData(); messageTransfer(String destination,Message msg); } ClientSession extends CommonSession implements Session { // no implementation for 90% of the methods // Acts as a Mask for Session 'class' so only session specific methods are visible to the user. } Communication LayerFrame Dispatch TreeThe following diagram depicts how an AMQP frame gets handled. Content Handler FlowMethod Handler Flow![]() ![]() ![]() ![]() |
![]() |
Document generated by Confluence on May 26, 2010 10:31 |