RocketMQ 基本概念
| Producer | 消息生产者,负责产生消息,一般由业务系统负责产生消息 |
| Consumer | 消息消费者,负责消费消息,一般是后台系统负责异步消费 |
| Push Consumer | Consumer的一种,应用通常向Consumer对象注册一个Listener接口,一旦收到消息,Consumer对象立刻回调Listener接口方法 |
| Pull Consumer | Consumer的一种,应用通常主动调用Consumer的拉消息方法从Broker拉消息,主动权由应用控制 |
| Producer Group | 一类Producer的集合名称,这类Producer通常发送一类消息,且发送逻辑一致 |
| Consumer Group | 一类Consumer的集合名称,这类Consumer通常消费一类消息,且消费逻辑一致 |
| Broker | 消息中转角色,负责存储消息,转发消息,一般也称为Server。 |
| 长连接 | 在页面嵌入一个隐藏的Iframe,将这个隐藏Iframe的src属性设置为对一个长连接的请求或是采用xhr请求,服务器端就源源不断的向客户端输入数据。 |
Ubunut中cannot change locale (zh_CN.UTF-8)问题处理
Laravel中Model为空的几种判断
- isEmpty判断
$user = User::where('mobile', Input::get('mobile'))->get(); if (!$user->isEmpty()){ $firstUser = $user->first() } - Exception的处理
try { $user = User::where('mobile', Input::get('mobile'))->firstOrFail(); //Do stuff when user exists. } catch (ErrorException $e) { //Do stuff if it doesn't exist. } - 其他
//Use either one of the below. $users = User::where('mobile', Input::get('mobile'))->get(); //Collection $users = User::where('mobile', Input::get('mobile'))->first(); //Model or null if (count($users)){ //Use the collection, to get the first item use $users->first(). //Use the model if you used ->first(); }
Mac OS X下安装pyenv
sequelize关闭命令行的提示
MAC安装PIL
MAC 10.11 OSX EI Brew安装环境问题汇总
- 权限问题
|
全部格掉重装的EI Capitan,然后把开发的代码再COPY过来,问题如下 [好文要转要收藏] UML类图几种关系的总结在UML类图中,常见的有以下几种关系:泛化(Generalization), 实现(Realization),关联(Association),聚合(Aggregation),组合(Composition),依赖(Dependency) Mac下ssh使用密钥登录
Iconic One Theme | Powered by Wordpress
|