跳到主要内容

配置保证送达消息传递

要使客户端能够向Solace PubSub+事件代理发布保证消息并接收保证消息,必须执行以下事件代理配置步骤:

  • 必须配置并启用系统级消息缓冲。参见系统级消息缓冲配置。

  • 必须为客户端将使用的客户端配置消息VPN以进行保证消息传递。这也可以包括配置持久端点。参见消息VPN级保证消息配置。

  • 必须为客户端启用保证消息传递。

    • 默认情况下,在Solace PubSub+设备上,客户端无法使用保证消息传递——必须配置并分配给客户端使用的客户端用户名一个允许发布和/或接收保证消息的客户端配置文件。
    • 默认情况下,在Solace PubSub+软件事件代理上,客户端已启用保证消息传递。

有关更多信息,请参见配置客户端授权部分中的配置保证消息参数。

对于JMS客户端,使用的连接工厂必须将direct-transport属性设置为false,以便消息使用保证传输模式而不是默认的直接传输模式进行传递。参见配置连接工厂。

事务配置

对于客户端应用程序要以本地或XA事务发布和/或接收消息,您还必须执行额外的配置:

  • 在使用的客户端配置文件中启用事务支持。参见允许事务会话。
  • 如有需要,增加使用的客户端配置文件允许的最大事务数量属性值。参见配置最大事务数量。
  • 如有需要,增加使用的客户端配置文件允许的每事务最大消息数量属性值。(更改每事务最大消息数量是一个受控可用性(CA)特性,应在Solace支持的监督下使用。)
  • 对于XA事务,为使用的连接工厂启用xa属性。此属性允许连接的JMS客户端也使用XA事务。(默认情况下,此属性在默认的Solace连接工厂中未启用。)

CLI命令序列示例

以下CLI命令序列示例显示了在Solace PubSub+设备上启动保证消息传递和配置队列及主题端点所需的任务。

此示例假设已经完成了基本的事件代理配置任务,例如启动消息VPN和IP接口配置任务。

solace(configure)# hardware message-spool
solace(configure/hardware/message-spool)# disk-array wwn 60:06:01:60:e8:60:1c:00:02:88:44:db:5d:6d:de:11
solace(configure/hardware/message-spool)# no shutdown primary
solace(configure/hardware/message-spool)# end

solace(configure)# client-profile default
solace(configure/client-profile)# allow-guaranteed-message-receive
solace(configure/client-profile)# allow-guaranteed-message-send
solace(configure/client-profile)# exit

solace(configure)# client-username default message-vpn default
solace(configure/client-username)# client-profile default
solace(configure/client-username)# no shutdown
solace(configure/client-username)# exit

solace(configure)# message-spool message-vpn default
solace(configure/message-spool)# max-spool-usage 60000
solace(configure/message-spool)# create queue testQueue
solace(configure/message-spool/queue)# permission all modify-topic
solace(configure/message-spool/queue)# no shutdown
solace(configure/message-spool/queue)# exit
solace(configure/message-spool)# create topic-endpoint testTopicEndpoint
solace(configure/message-spool/topic-endpoint)# permission all modify-topic
solace(configure/message-spool/topic-endpoint)# no shutdown
solace(configure/message-spool/topic-endpoint)# end