You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Following diagrams are my understanding of the ServiceMix architecture based on a study of the source code. Enjoy – PS.

Contents

NMR Flow types

The flow type determines the mechanism by which the Normalized Message Router (NMR) Broker sends messages from one BC/SE to another.

Flow implementation classes

  • JBIContainer "flowName" attribute determines the flow type used
  • There is only 1 flow per Broker (and 1 Broker per JBIContainer)
  • Flow name/class mappings are in the ServiceMix JAR. See META-INF/services/org/servicemix/jbi/nmr/flow
  • There are a number of flow implementations. For example: STFlow, SedaFlow, JMSFlow, JCAFlow

goto top

Broker send sequence diagram

  • The NMR Broker calls sendExchangePacket to deliver a message
  • The flow implementation of abstract doSend Method determines how the message sending mechanism works

goto top

STFlow

STFlow = "Straight Through" Flow. This is the simplest mechanism.

There is no staging or buffering.

sequence diagram

goto top

SedaFlow

SEDA = "Staged Event Driven Architecture" Flow.

SEDA decomposes a complex, event-driven application into a set of stages connected by queues.

SedaFlow / SedaQueue classes

  • There is 1 SedaFlow instance and a number of SedaQueue instances (1 per component)
  • The SedaFlow "enqueues" an ME to send a message
  • The SedaQueue instance "dequeues" the ME and processes it
  • Each SedaQueue holds a concurrent HashMap of MessageExchanges (MEs) to the component. Enqueue/Dequeue is simply put/get of this HashMap

goto top

sequence diagram

  • SedaQueue instances are lazilly created as needed and referenced in a queueMap
  • Each SedaQueue instance runs as JCA1.5 asynchronous Work thread polling the HashMap at fixed intervals
  • Having enqueued the ME, the SedaFlow doSend Method may return
  • When the SedaQueue Worker (run Method) finds (dequeues) an ME, it processes it in another JCA Worker thread created solely for that purpose

goto top

JMSFlow

TODO

JMSFLow classes and JMS Destinations

  • TODO add more notes

goto top

Notification of remote component state changes

  • TODO add more notes

goto top

JMSFlow send ME sequence diagram

  • TODO add more notes

goto top

  • No labels