如何設定 ActiveMQ Classic 使用 AIO 伺服器傳輸

 常見問題 > 設定 > 如何設定 ActiveMQ Classic 使用 AIO 伺服器傳輸

針對 Windows XP

  1. 從 IBM 下載 AIO (Java 非同步 I/O) (http://www.alphaworks.ibm.com/tech/aio4j)。

  2. 解壓縮下載的檔案並複製以下檔案

    • ibmaio.dll
    • ibmaio-1.0.jar
  3. 將 ibmaio.dll 放置到 Windows System32 資料夾。(您可能需要重新啟動才能生效)

  4. 在類別路徑中包含 ibmaio-1.0.jar。

  5. 編輯 ActiveMQ Classic 的組態檔 (activemq.xml,位於 conf 資料夾中)。尋找以下程式碼片段

     <!-- ==================================================================== -->
     <!-- ActiveMQ Classic Broker Configuration -->
     <!-- ==================================================================== -->
     <broker>
      <connector>
       <tcpServerTransport uri="tcp://127.0.0.1:61616" backlog="1000" useAsyncSend="true" maxOutstandingMessages="50"/>
      </connector>
         .
         .
     </broker>   
    

    變更連線器設定,將 tcpServerTransport 變更為 serverTransport 並移除不必要的參數)

     <connector>
      <serverTransport uri="activeio:aio://<ip address>:<port>" />
     </connector>
    

    範例

     <connector>
      <serverTransport uri="activeio:aio://192.168.0.162:61616" />
     </connector>
    

Apache、ActiveMQ、Apache ActiveMQ、Apache 羽毛標誌和 Apache ActiveMQ 專案標誌是 Apache 軟體基金會的商標。 版權所有 © 2024,Apache 軟體基金會。 依 Apache License 2.0 授權。