Show Table of Contents
20.6.5. 配置 HornetQ Core Bridge
例 20.3. HornetQ Core Bridge 的配置示例:
这个例子里的值将用于本节里剩余的内容。
<bridges>
<bridge name="myBridge">
<queue-name>jms.queue.InQueue</queue-name>
<forwarding-address>jms.queue.OutQueue</forwarding-address>
<ha>true</ha>
<reconnect-attempts>-1</reconnect-attempts>
<use-duplicate-detection>true</use-duplicate-detection>
<static-connectors>
<connector-ref>
bridge-connector
</connector-ref>
</static-connectors>
</bridge>
</bridges>
表 20.8. HornetQ Core Bridge 属性
| 属性 | 描述 |
|---|---|
| name |
服务器上所有的桥都必须有一个唯一名称。
|
| queue-name |
这个强制性的参数是桥消费的本地队列的唯一名称。在启动时实例化桥时这个队列必须已经存在。
|
| forwarding-address |
这是消息将转发至的目标服务器上的地址。如果没有指定转发地址,那么消息的原始地址将被保留。
|
| ha |
这个可选参数指定这个桥是否应该支持高可用性。
true 表示它将连接至群集里的任何可用的服务器并支持失效切换。默认值是 false。
|
| reconnect-attempts |
这个可选参数指定桥在放弃和关闭前应该尝试重新连接的总共次数。-1 表示无限次重试。默认值是 -1。
|
| use-duplicate-detection |
这个可选参数指定桥是否自动插入重复的 ID 属性至它转发的每条消息里。
|
| static-connectors |
static-connectors 是指向其他地方定义的连接器元素的 connector-ref 元素的列表。连接器封装使用的传输协议(TCP、SSL、HTTP 等)已及服务器连接参数(主机、端口等)。
|

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.