導航:首頁 > 編程語言 > 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相關的資料

熱點內容
網路中常用的傳輸介質 瀏覽:518
文件如何使用 瀏覽:322
同步推密碼找回 瀏覽:865
樂高怎麼才能用電腦編程序 瀏覽:65
本機qq文件為什麼找不到 瀏覽:264
安卓qq空間免升級 瀏覽:490
linux如何刪除模塊驅動程序 瀏覽:193
at89c51c程序 瀏覽:329
怎麼創建word大綱文件 瀏覽:622
裊裊朗誦文件生成器 瀏覽:626
1054件文件是多少gb 瀏覽:371
高州禁養區內能養豬多少頭的文件 瀏覽:927
win8ico文件 瀏覽:949
仁和數控怎麼編程 瀏覽:381
項目文件夾圖片 瀏覽:87
怎麼在東芝電視安裝app 瀏覽:954
plc顯示數字怎麼編程 瀏覽:439
如何辨別假網站 瀏覽:711
寬頻用別人的賬號密碼 瀏覽:556
新app如何佔有市場 瀏覽:42

友情鏈接