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

熱點內容
餘姚數控編程培訓哪裡專業 瀏覽:419
qq空間66版本下載 瀏覽:908
有一款看美劇的app是什麼 瀏覽:397
前端後端json資料庫 瀏覽:267
vi文件格式linux 瀏覽:963
php如何引用js文件 瀏覽:531
word轉成pdf怎麼設置漸變色背景 瀏覽:655
數控車床車刀如何編程 瀏覽:577
為什麼復制到u盤沒有文件 瀏覽:792
三星怎麼設置文件的打開方式 瀏覽:332
微信怎麼發大容量的文件夾 瀏覽:130
hl線切割編程怎麼旋轉圖形 瀏覽:234
qq頭像露全身 瀏覽:811
力量運動員影響哪些體檢數據 瀏覽:176
金山哪裡有加工中心編程培訓學校 瀏覽:113
壓縮文件正在壓縮怎麼取消 瀏覽:462
excel中添加文件路徑名 瀏覽:16
手機收銀用哪個app 瀏覽:229
qq非主流圖片女生帶字 瀏覽:849
移動端js地圖 瀏覽:570

友情鏈接