ZeroConf 傳輸參考

使用 ActiveMQ Classic > 設定傳輸 > ZeroConf 傳輸參考

ZeroConf 傳輸

ZeroConf 傳輸的工作方式與 探索傳輸 類似,不同之處在於它使用基於 ZeroConf 的探索代理程式來定位要連線的代理程式 URI 清單。

設定語法

zeroconf:serviceName?transportOptions

zeroconf:serviceName

其中 serviceName 是 Zeroconf 服務名稱;看起來是以底線 (_) 開頭,並且必須以句點 (.) 結尾。 因此,我們可以使用此服務名稱來區分開發、UAT 和生產代理程式,或者將它們分組到網域等。

請注意,為了能夠使用 ZeroConf 尋找代理程式,代理程式需要啟用 探索。 要在代理程式中設定探索,您應該使用 Xml 設定。 基本上就像這樣...

<broker name="foo">
  <transportConnectors>
    <transportConnector name="openwire" uri="tcp://0.0.0.0:61616" discoveryUri="zeroconf:_activemq_development. />
  </transportConnectors>
  ...
</broker>
客戶端 URI 範例
zeroconf:_activemq_development.

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