Coder Social home page Coder Social logo

rabbitmq_channel_pool's Introduction

rabbitmq channel池

简介

rabbitmq channel池实现,采用单条连接,IO多路复用方式,rabbitmq channel池和我们普通连接池的实现方式稍有差别,不是建立多个tcp连接,而是使用channel pool的方式实现,性能很好,分享出来

功能

  1. channel池实现,用单条连接,IO多路复用方式
  2. 增加断线重新支持;
  3. 增加channel异常处理;
  4. 支持订阅多个队列;

关于连接池

使用连接池(创建多个TCP连接,每个TCP连接创建channel池)做了一下测试,结果和单连接channel池性能相差不大,发现没必要创建连接池;

性能测试数据

序号 消息大小(byte) 测试结果(s)
1 85 41250
2 180 39805
3 225 44504
4 888 39092

测试环境:
系统:ubuntu 19.04
CPU: intel core i5-7500 CPU 3.4GHZ *4
内存:16G
硬盘:ST2000DM005-2CW102, SATA III
网卡:1000M

开始

rabbitmq_channel_pool's People

Contributors

hhq163 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

rabbitmq_channel_pool's Issues

channel重复使用的问题

有个问题, channel池只是一个数组,假设获取channel的那个人没有用完,第二个人又接着用channel了 会有问题吧

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.