SlideShare a Scribd company logo
1 of 13
MassTransit
Shengyan Cheng
What is MassTransit
• Lightweight ESB
• Open Source
• FREE (Apache 2.0)
• Easy to Learn
ESB : Enterprise Service Bus
整合異質系統和服務的機制,通常是透過消息服務和事件機制
Comparison with MQ
Feature
• 重試: 依Exception類型決定Retry機制.
• 限速: 指定一定在時間內消費者處理數量
• CircuitBreak: 提供CircuitBreak模式支援
• 異常處理: 內建額外的異常處理攔截機制
• 定時發送: 指定時間發送消息
Queue
• InMemory , RabbitMQ, AzureServiceBus
Serializer
• BinarySerializer, BsonSerializer , JsonSerializer, XmlSerializer
Comparison Summary
NServiceBUS, MassTransit, RabbitMQ, MSMQ
• 若需要商業支援: NServiceBus
• 若需要較多支援種類: Masstransit
• 若需要搭配DTC: MSMQ
• 若需要更多功能和細節控制: RabbitMQ
NServiceBus will support ActiveMQ in next version
Comparison in Github
Request and Forget Patten
Demo 1
Producer
Consumer
Consumer Handler
• Event Handle
• Exception Handle
Result
Different with RabbitMQ
Demo 2
Producer
Consumber

More Related Content

What's hot

Timyang新浪微博设计谈
Timyang新浪微博设计谈Timyang新浪微博设计谈
Timyang新浪微博设计谈
Cevin Cheung
 
构建基于Lamp的网站架构
构建基于Lamp的网站架构构建基于Lamp的网站架构
构建基于Lamp的网站架构
Cosey Lee
 
Bypat博客出品-服务器运维集群方法总结3
Bypat博客出品-服务器运维集群方法总结3Bypat博客出品-服务器运维集群方法总结3
Bypat博客出品-服务器运维集群方法总结3
redhat9
 
高性能并发Web服务器实现核心内幕
高性能并发Web服务器实现核心内幕高性能并发Web服务器实现核心内幕
高性能并发Web服务器实现核心内幕
ideawu
 
性能优化
性能优化性能优化
性能优化
Lu Wei
 
负载均衡
负载均衡负载均衡
负载均衡
uptodate
 

What's hot (13)

Timyang新浪微博设计谈
Timyang新浪微博设计谈Timyang新浪微博设计谈
Timyang新浪微博设计谈
 
A
AA
A
 
Hantuo openstack
Hantuo openstackHantuo openstack
Hantuo openstack
 
java title
java titlejava title
java title
 
Build scalable microblog qcon beijing 2010
Build scalable microblog qcon beijing 2010Build scalable microblog qcon beijing 2010
Build scalable microblog qcon beijing 2010
 
构建基于Lamp的中型网站架构
构建基于Lamp的中型网站架构构建基于Lamp的中型网站架构
构建基于Lamp的中型网站架构
 
张铁安:Feed系统架构浅析
张铁安:Feed系统架构浅析张铁安:Feed系统架构浅析
张铁安:Feed系统架构浅析
 
构建基于Lamp的网站架构
构建基于Lamp的网站架构构建基于Lamp的网站架构
构建基于Lamp的网站架构
 
Bypat博客出品-服务器运维集群方法总结3
Bypat博客出品-服务器运维集群方法总结3Bypat博客出品-服务器运维集群方法总结3
Bypat博客出品-服务器运维集群方法总结3
 
高性能并发Web服务器实现核心内幕
高性能并发Web服务器实现核心内幕高性能并发Web服务器实现核心内幕
高性能并发Web服务器实现核心内幕
 
豆瓣网技术架构变迁
豆瓣网技术架构变迁豆瓣网技术架构变迁
豆瓣网技术架构变迁
 
性能优化
性能优化性能优化
性能优化
 
负载均衡
负载均衡负载均衡
负载均衡
 

Viewers also liked

sustainable-business-mag-sunpump-solar-nov2015
sustainable-business-mag-sunpump-solar-nov2015sustainable-business-mag-sunpump-solar-nov2015
sustainable-business-mag-sunpump-solar-nov2015
SunPump Solar
 

Viewers also liked (18)

Facebook 2
Facebook 2Facebook 2
Facebook 2
 
Proyecto: Enet Nº 1
Proyecto: Enet Nº 1Proyecto: Enet Nº 1
Proyecto: Enet Nº 1
 
Unidad 5
Unidad 5 Unidad 5
Unidad 5
 
Programa de governo de Geraldo
Programa de governo de GeraldoPrograma de governo de Geraldo
Programa de governo de Geraldo
 
Proyecto institucional
Proyecto institucionalProyecto institucional
Proyecto institucional
 
Tecnologia
TecnologiaTecnologia
Tecnologia
 
sustainable-business-mag-sunpump-solar-nov2015
sustainable-business-mag-sunpump-solar-nov2015sustainable-business-mag-sunpump-solar-nov2015
sustainable-business-mag-sunpump-solar-nov2015
 
Day in the life of product manager
Day in the life of product managerDay in the life of product manager
Day in the life of product manager
 
Prueba matemática técnico 2015
Prueba matemática técnico  2015Prueba matemática técnico  2015
Prueba matemática técnico 2015
 
bilans_slides_publics
bilans_slides_publicsbilans_slides_publics
bilans_slides_publics
 
Tarea de cta
Tarea de ctaTarea de cta
Tarea de cta
 
Islam in the Philippines
Islam in the Philippines Islam in the Philippines
Islam in the Philippines
 
Business Information and ICT
Business Information and ICTBusiness Information and ICT
Business Information and ICT
 
38. análisis costes del producto
38. análisis costes del producto38. análisis costes del producto
38. análisis costes del producto
 
IEFI Práctica Docente II
IEFI Práctica Docente IIIEFI Práctica Docente II
IEFI Práctica Docente II
 
Підгайний О.М.
Підгайний О.М.Підгайний О.М.
Підгайний О.М.
 
Marketing B2B-les 7 affections chroniques du content marketing
Marketing B2B-les 7 affections chroniques du content marketingMarketing B2B-les 7 affections chroniques du content marketing
Marketing B2B-les 7 affections chroniques du content marketing
 
Adjectives
AdjectivesAdjectives
Adjectives
 

Similar to MassTransit

新浪微博平台与安全架构
新浪微博平台与安全架构新浪微博平台与安全架构
新浪微博平台与安全架构
n716
 
企業導入微服務實戰 - updated
企業導入微服務實戰 - updated企業導入微服務實戰 - updated
企業導入微服務實戰 - updated
Paul Chao
 
03.osb概览
03.osb概览03.osb概览
03.osb概览
Meng He
 
阿里云技术实践
阿里云技术实践阿里云技术实践
阿里云技术实践
drewz lin
 
构建可扩展的微博系统
构建可扩展的微博系统构建可扩展的微博系统
构建可扩展的微博系统
lonegunman
 
Redis在唯品会的应用实践.pdf
Redis在唯品会的应用实践.pdfRedis在唯品会的应用实践.pdf
Redis在唯品会的应用实践.pdf
jaydenhu
 
企業導入微服務實戰 - updated
企業導入微服務實戰 - updated企業導入微服務實戰 - updated
企業導入微服務實戰 - updated
Paul Chao
 
MySQL自动切换设计与实现
MySQL自动切换设计与实现MySQL自动切换设计与实现
MySQL自动切换设计与实现
orczhou
 

Similar to MassTransit (20)

新浪微博平台与安全架构
新浪微博平台与安全架构新浪微博平台与安全架构
新浪微博平台与安全架构
 
廣宣學堂: 企業導入微服務實戰
廣宣學堂: 企業導入微服務實戰廣宣學堂: 企業導入微服務實戰
廣宣學堂: 企業導入微服務實戰
 
企業導入微服務實戰 - updated
企業導入微服務實戰 - updated企業導入微服務實戰 - updated
企業導入微服務實戰 - updated
 
微服務自己動手做
微服務自己動手做微服務自己動手做
微服務自己動手做
 
03.osb概览
03.osb概览03.osb概览
03.osb概览
 
阿里云技术实践
阿里云技术实践阿里云技术实践
阿里云技术实践
 
Databases on AWS
Databases on AWSDatabases on AWS
Databases on AWS
 
构建可扩展的微博系统
构建可扩展的微博系统构建可扩展的微博系统
构建可扩展的微博系统
 
MongoDB at Qihoo 360
MongoDB at Qihoo 360MongoDB at Qihoo 360
MongoDB at Qihoo 360
 
Redis在唯品会的应用实践.pdf
Redis在唯品会的应用实践.pdfRedis在唯品会的应用实践.pdf
Redis在唯品会的应用实践.pdf
 
Golang 高性能实战
Golang 高性能实战Golang 高性能实战
Golang 高性能实战
 
微服務架構 導入經驗分享 吳剛志 - Community Open Camp
微服務架構 導入經驗分享 吳剛志 - Community Open Camp微服務架構 導入經驗分享 吳剛志 - Community Open Camp
微服務架構 導入經驗分享 吳剛志 - Community Open Camp
 
企業導入微服務實戰 - updated
企業導入微服務實戰 - updated企業導入微服務實戰 - updated
企業導入微服務實戰 - updated
 
Kafka cluster best practices
Kafka cluster best practicesKafka cluster best practices
Kafka cluster best practices
 
Large-Scale Cluster Mangement & Kubernetes Under The Hood
Large-Scale Cluster Mangement & Kubernetes Under The HoodLarge-Scale Cluster Mangement & Kubernetes Under The Hood
Large-Scale Cluster Mangement & Kubernetes Under The Hood
 
V ds深入探究
V ds深入探究V ds深入探究
V ds深入探究
 
MySQL自动切换设计与实现
MySQL自动切换设计与实现MySQL自动切换设计与实现
MySQL自动切换设计与实现
 
主库自动切换 V2.0
主库自动切换 V2.0主库自动切换 V2.0
主库自动切换 V2.0
 
OpenStack Resource Scheduling
OpenStack Resource SchedulingOpenStack Resource Scheduling
OpenStack Resource Scheduling
 
IBM Cloud Private Introduction
IBM Cloud Private IntroductionIBM Cloud Private Introduction
IBM Cloud Private Introduction
 

MassTransit

Editor's Notes

  1. MassTransit 是 .net 的 輕量級esb solution 免費開源,可用於商品環境 相較於直接存取RabbitMQ簡化許多
  2. NServiceBus will support ActiveMQ in next version
  3. NServiceBus will support ActiveMQ in next version
  4. Actually , this is the result of RPC patten
  5. NServiceBus will support ActiveMQ in next version
  6. Masstransit 操作上省去了exchange 的定義宣告較為簡化 若要加上retry機制等功能,也只要加上一行
  7. Masstransit 部分多了exception處理