Skip to content

Commit d94eb52

Browse files
committed
update some blogs
1 parent bd8cf49 commit d94eb52

5 files changed

+17
-22
lines changed

_posts/2018/2018-05-25-java-IO-summary.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ author: "LSG"
77
header-img: "img/post-bg-2015.jpg"
88
catalog: true
99
tags:
10-
-java
11-
-NIO
10+
- java
11+
- NIO
1212
---
1313

1414
“对语言设计人员来说,创建好的输入/输出系统是一项特别困难的任务。”

_posts/2018/2018-07-27-my-linux-init.markdown

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ author: "LSG"
77
header-img: "img/post-bg-css.jpg"
88
catalog: true
99
tags:
10-
-linux
11-
-tmux
12-
-oh my zsh
10+
- linux
11+
- tmux
12+
- oh my zsh
1313
---
1414

1515
# 安装内容 :按照次序~~(暂时不安装一些插件)

_posts/2018/2018-10-16-vimForMe-setting.md renamed to _posts/2018/2018-10-16-vimForMe-setting.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ mathjax: true
99
catalog: true
1010
author: "LSG"
1111
tags:
12-
-linux
13-
-vim
12+
- linux
13+
- vim
1414
---
1515

1616
> vim 使用的简易配置,包括文字高亮,行号切换, 文件树浏览 以及 简单的自动补全

_posts/2018/2019-07-10-hive-connect-right-method.md renamed to _posts/2018/2019-07-10-hive-connect-right-method.markdown

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ author: dingyun
99
header-img: "img/lxy004.jpg"
1010
catalog: true
1111
tags:
12-
-hadoop
13-
-hive
14-
-nohup
12+
- hadoop
13+
- hive
14+
- nohup
1515
---
1616
> 自建集群hiveserver2需要后台启动,客户端操作hive比直接链接hive会更方便
1717

_posts/2019/2019-07-07-how-to-use-amq.markdown

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ tags:
1111
- about
1212
---
1313

14-
15-
> ᵃ ʷⁱˢᵉ ᵐᵃⁿ ⁿᵉᵛᵉʳ ᶠᵃˡˡ ⁱⁿ ˡᵒᵛᵉ
16-
1714
## 前言
1815
​ 具体场景是工作中机器上所有项目服务日志并不落地自己所在机器,而是发送到一台机器的amq上,通过重写log4j源代码,重新解析log4j.propertites文件把所有项目日志分目录,层次的打到各个文件目录下,并把异常日志通过项目配置人的方式发送到每个人的邮件和企业微信上.
1916

@@ -23,10 +20,6 @@ tags:
2320

2421
"ActiveMQ -> 生产者和消费者保证消息可靠性的常见使用"
2522

26-
27-
28-
----------------------------------------------------------------
29-
3023
## 使用消息队列的优缺点分析
3124
### 消息队列共有的优点:
3225

@@ -179,11 +172,13 @@ public void sendMessage(ActiveMQMessage msg, final String msgid) throws JMSExcep
179172
}
180173
```
181174
> 异步发送丢失消息的场景是:生产者设置UseAsyncSend=true,使用producer.send(msg)持续发送消息。由于消息不阻塞,
175+
>
182176
> 生产者会认为所有send的消息均被成功发送至MQ。如果服务端突然宕机,此时生产者端内存中尚未被发送至MQ的消息都会丢失。
183177
184-
185178
异步发送需要接收回执并由客户端再判断一次是否发送成功,一般通过回执消息来保证消息的可靠性.
186179

180+
181+
187182
源码解读: 发送的线程通过回调函数告诉主线程是否发送成功,主线程根据收到的消息进行不同情形下的数据处理
188183

189184

@@ -256,7 +251,7 @@ public class LogConsumerWithAMQ implements MessageListener {
256251
2. 消费者同步消费,消息消费成功手动 msg.acknowledge() /消费者异步消费,消费成功再 msg.acknowledge()
257252

258253
## References
259-
[消息队列对比传统模式的优点](https://blog.csdn.net/wonderful_life_mrchi/article/details/84667426)
260-
[ActiveMQ异步发送使用及常见误区](https://www.jianshu.com/p/58e9deae6c4b)
261-
[activemq发送同步发送和异步发送](https://blog.csdn.net/YAOQINGGG/article/details/79833378)
262-
[jms的消息确认和事务](https://segmentfault.com/a/1190000015920000)
254+
1. [消息队列对比传统模式的优点](https://blog.csdn.net/wonderful_life_mrchi/article/details/84667426)
255+
2. [ActiveMQ异步发送使用及常见误区](https://www.jianshu.com/p/58e9deae6c4b)
256+
3. [activemq发送同步发送和异步发送](https://blog.csdn.net/YAOQINGGG/article/details/79833378)
257+
4. [jms的消息确认和事务](https://segmentfault.com/a/1190000015920000)

0 commit comments

Comments
 (0)