导航:首页 > 编程语言 > stompjsactivemq

stompjsactivemq

发布时间:2023-05-13 17:27:14

A. Activemq的stomp怎么能一条一条地接收消息,而不是全部接收

ActiveMQ另问题要软件能挂掉挂掉怕怕挂掉信息给丢所本节析几种持久化式:

、持久化文件
ActiveMQ默认支持种式要发消息设置消息持久化

打安装目录配置文件:

D:\ActiveMQ\apache-activemq\conf\activemq.xml越80行发现默认配置渗御迟项:

注意使用kahaDB基于文件支持事务消息存储器靠高性能扩展消息存储器

设计初衷使用简单并尽能快KahaDB索引使用transaction log并且所destination使用index测试表明:用于产环境支持1万active connection每connection独立queue该表现已经丛李足矣应付部需求

再发送消息候改变第二参数:

MsgDeliveryMode.Persistent

Message保存式2种
PERSISTENT:保存磁盘consumer消费message删除
NON_PERSISTENT:保存内存消费message清除
注意:堆积消息太能导致内存溢

打产者端发送消息:

wps30F4.tmp

启消费者端同管理界面查看:

wps3105.tmp

发拆兄现消息等待没持久化ActiveMQ宕机重启消息丢失我现修改文件持久化重启ActiveMQ消费者仍能够收消息

wps3106.tmp

二、持久化数据库
我支持Mysql例先载mysql-connector-java-5.1.34-bin.jar包放:

D:\ActiveMQ\apache-activemq\lib目录

打并修改配置文件:

复制代码
<beans
xmlns=""
xmlns:xsi=""
xsi:schemaLocation=" /spring-beans.xsd
/activemq-core.xsd">

file:${activemq.conf}/credentials.properties

<bean id="logQuery" class="org.fusesource.insight.log.log4j.Log4jLogQuery"
lazy-init="false" scope="singleton"
init-method="start" destroy-method="stop">

<!--
The element is used to configure the ActiveMQ broker.
-->

<!-- The is used to prevent
slow topic consumers to block procers and affect other consumers
by limiting the number of messages that are retained
For more information, see:

-->

<!--
The managementContext is used to configure how ActiveMQ is exposed in
JMX. By default, ActiveMQ uses the MBean server that is started by
the JVM. For more information, see:

-->

<!--
Configure message persistence for the broker. The default persistence
mechanism is the KahaDB store (identified by the kahaDB tag).
For more information, see:

-->

<!--
The systemUsage controls the maximum amount of space the broker will
use before disabling caching and/or slowing down procers. For more information, see:

-->

<!--
The transport connectors expose ActiveMQ over a given protocol to
clients and other brokers. For more information, see:

-->

<!--
Enable web consoles, REST and Ajax APIs and demos
The web consoles requires by default login, you can disable this in the jetty.xml file

Take a look at ${ACTIVEMQ_HOME}/conf/jetty.xml for more details
-->

-

阅读全文

与stompjsactivemq相关的资料

热点内容
android蓝牙传文件在哪里 浏览:354
苹果6s软解是真的吗 浏览:310
c语言代码量大 浏览:874
最新网络卫星导航如何使用 浏览:425
以下哪些文件属于图像文件 浏览:774
zycommentjs 浏览:414
确认全血细胞减少看哪些数据 浏览:265
文件有哪些要求 浏览:484
cad打开时会出现两个文件 浏览:65
什么是转基因网站 浏览:48
手柄设备有问题代码43 浏览:921
怎么他么怎么又网络了 浏览:649
java会出现内存泄露么 浏览:617
苹果4s锁屏后怎么还显示歌曲 浏览:207
鸿蒙系统文件管理哪些可以删除 浏览:550
ubuntuqt创建工程没有配置文件 浏览:126
网站登录变成其他网站怎么处理 浏览:202
ug数控编程学校有哪些 浏览:203
java图片上传显示 浏览:402
ppt的文件名后缀 浏览:902

友情链接