activemq基础之:(三)active-admin命令行管理工具

activemq-admin命令:

1、start
Creates and starts a broker using a configuration file, or a broker URI.
使用配置文件或代理URI创建和启动代理。
例子:

activemq-admin start(启动localhost)

activemq-admin start xbean:file:E:/apache-activemq-5.7.0/aaa/conf/activemq.xml

2、create
Creates a runnable broker instance in the specified path
创建一个可以运行的代理实例,在指定的路径。
做用是创建后,可以起多个实例,每个实例有自己的Queues和Topics,但是实例共用kahadb数据库。
例子:

activemq-admin create E:\apache-activemq-5.7.0\aaa

3、stop
Stops a running broker specified by the broker name.
停止一个指定代理名称的代理。
broker name配置在activemq.xml中。
例子:

activemq-admin stop aaa

4、list
Lists all available brokers in the specified JMX context.
列出在JMX中所有可用的代理。
例子:

activemq-admin list
...
Connecting to pid: 7868
BrokerName = aaa

5、query
Display selected broker component’s attributes and statistics.
显示选定的代理组件的属性和统计信息。

6、browse
Display selected messages in a specified destination.

7、journal-audit
Allows you to view records stored in the persistent journal.

8、purge
Delete selected destination’s messages that matches the message selector

9、encrypt
Encrypts given text

10、decrypt
Decrypts given text

activemq基础之:(二)activemq目录结构和启动

一、activemq目录结构

apache-activemq-5.7.0
├─bin(启动脚本)
│  ├─win32
│  └─win64
├─conf(配置文件)
├─data(日志文件)
├─docs(说明文档)
├─example(例子:包括配置文件、代码)
│  ├─conf
│  ├─perfharness
│  ├─ruby
│  ├─src
│  └─transactions
│      └─src
├─lib(activemq用到的jar包)
│  ├─camel
│  ├─extra
│  ├─optional
│  └─web
└─webapps(管理台的应用)
    ├─admin
    │  ├─decorators
    │  ├─images
    │  ├─js
    │  │
    │  ├─META-INF
    │  ├─styles
    │  ├─test
    │  ├─WEB-INF
    │  │
    │  └─xml
    ├─demo
    │  ├─js
    │  ├─META-INF
    │  ├─portfolio
    │  ├─sandbox
    │  ├─test
    │  │
    │  ├─WEB-INF
    │  └─websocket
    ├─fileserver
    │  ├─META-INF
    │  └─WEB-INF
    │
    └─styles


继续阅读activemq基础之:(二)activemq目录结构和启动

activemq基础之:(一)什么是JMS

一、什么是JMS
JMS即Java消息服务(Java Message Service)应用程序接口,是一个Java平台中关于面向消息中间件(MOM)的API,用于在两个应用程序之间,或分布式系统中发送消息,进行异步通信。Java消息服务是一个与具体平台无关的API,绝大多数MOM提供商都对JMS提供支持(百度百科给出的概述)。我们可以简单的理解:两个应用程序之间需要进行通信,我们使用一个JMS服务,进行中间的转发,通过JMS的使用,我们可以解除两个程序之间的耦合。

二、JMS的优势  
Asynchronous(异步)
JMS is asynchronous by default. So to receive a message, the client is not required to send the request. The message will arrive automatically to the client as they become available.
(JMS原本就是一个异步的消息服务,客户端获取消息的时候,不需要主动发送请求,消息会自动发送给可用的客户端。)

Reliable(可靠)
JMS provides the facility of assurance that the message will delivered once and only once. You know that duplicate messages create problems. JMS helps you avoiding such problems.
(JMS保证消息只会递送一次。大家都遇到过重复创建消息问题,而JMS能帮你避免该问题。)
继续阅读activemq基础之:(一)什么是JMS

身体发出的信号

有时候工作压力大、疲劳或熬夜后,身体会有一些症状提醒你要注意休息了。
1}掉头发
2)发痘痘
3)口腔发溃疡
4)脖子淋巴会肿
5)身上发出红色血点
6)头晕
7)感觉心脏跳的很快
8)手指甲有黑线
9)手指甲开裂

有以上症状说明身体不适了,关键要保证睡眠时间!!