---
title: "activemq5.8.0 客户端，服务端启动序列图"
author: "dingjun1"
date: "2013-06-20T18:26:14Z"
tags: []
categories: ["开源软件"]
slug: "activemq5-8-0"
draft: false
lastmod: "2013-06-23T22:20:30Z"
id: 1890810
url: "https://dingjun1.iteye.com/blog/1890810"
---

服务端序列图

![](http://dl2.iteye.com/upload/attachment/0086/0315/795d90db-d9b5-3c39-8d44-d3e892f6dafd.png)

客户端序列图

![](http://dl2.iteye.com/upload/attachment/0086/0317/a1e6eeed-333e-35fa-aef1-a9045b1a911a.png)


客户端与服务端交互


![](http://dl2.iteye.com/upload/attachment/0086/1049/439069d2-057f-3293-a885-7595fce16a01.png)




transport:责任链模式，

ResponseCorrelator:oneway设置消息的编号，onCommand:对阻塞的futureResponse设置值，解除等待结果的线程阻塞。

MutexTransport：通过锁进行线程同步

WireFormatNegotiator：通过闭锁协调wireFormat与服务端的交互

InactivityMonitor：启动readcheck  writecheck定时任务，维护心跳

TcpTransport tcp协议的业务处理，写入流，输出流


ActiveMQConnection:
负责处理客户端接受到的command

TransportConnection
负责处理服务端接受到的command