Coder Social home page Coder Social logo

boyliuji / rocketmq-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shaylau/rocketmq-demo

0.0 0.0 0.0 47 KB

🚀🚀RocketMQ 入门、RocketMQ 集成 SpringBoot、Spring Cloud Stream RocketMQ 集成实践、快速上手 RocketMQ、部分底层源码分析(查看 MarkDown 中文档地址)👏👏

Java 100.00%

rocketmq-demo's Introduction

RocketMQ-Demo项目说明

MQ 简介

MQ的作用

  • 应用解耦
  • 流量削锋
  • 数据分发

使用 MQ 的缺点

可用性降低、MQ 宕机影响业务、系统复杂度提高(重复消费、消息丢失、消息顺序性)、一致性问题

RocketMQ 单机启动

启动 NameSrv

配置(默认端口 9876)

./mqnamesrv &

启动 boker

broker 的默认端口是 10911

./mqbroker -n localhost:9876  -c ../conf/broker.conf  autoCreateTopicEnable=true &

关闭 NameSrv

./mqshutdown namesrv

关闭 boker

./mqshutdown broker

测试 RocketMQ是否正常运行

Before sending/receiving messages, we need to tell clients the location of name servers. RocketMQ provides multiple ways to achieve this. For simplicity, we use environment variable NAMESRV_ADDR

> export NAMESRV_ADDR=localhost:9876
 > sh bin/tools.sh org.apache.rocketmq.example.quickstart.Producer
 SendResult [sendStatus=SEND_OK, msgId= ...
 > sh bin/tools.sh org.apache.rocketmq.example.quickstart.Consumer
 ConsumeMessageThread_%d Receive New Messages: [MessageExt...
  • 配置环境变量
export NAMESRV_ADDR=localhost:9876
  • 生产消息
./tools.sh org.apache.rocketmq.example.quickstart.Producer
  • 消费消息
./tools.sh org.apache.rocketmq.example.quickstart.Consumer

RocketMQ 教程系列文章说明

消息生产者

RocketMQ 消息生产者详细说明

消息消费者

RocketMQ 消息消费者详细说明

消息事务

RocketMQ 事务详解

RocketMQ集成 Springboot

RocketMQ 集成 Springboot

分布式应用集成Spring Cloud Stream RocketMQ说明

Spring Cloud Stream RocketMQ(一) 消息发送接收初试 Spring Cloud Stream RocketMQ(二) Binder 源码分析 Spring Cloud Stream RocketMQ(三)发送源码分析 Spring Cloud Stream RocketMQ(四)消费源码分析

参考文档

rocketmq-demo's People

Contributors

shaylau avatar

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.