【发布时间】:2010-07-13 06:18:59
【问题描述】:
我已经使用 JMS 消息目标实现了带有 spring blazeDs 消息服务的应用程序客户端-服务器。
这个想法是Java中声明的生产者使用activeMQ发送消息,而Flex中声明的消费者接收它们。
我已将 AMFChannel 配置为轮询间隔为 0,但我看到当消费者在 Flex 中订阅目的地时,时间请求最长可达 3 秒。
我的服务配置中的代码是:
<services>
<default-channels>
<channel ref="my-amf"/>
</default-channels>
</services>
<channels>
<channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
<endpoint url="http://{server.name}:{server.port}/{context.root}/spring/messagebroker/amf"
class="flex.messaging.endpoints.AMFEndpoint"/>
<properties>
<polling-enabled>true</polling-enabled>
<polling-interval-seconds>0</polling-interval-seconds>
</properties>
</channel-definition>
</channels>
我的应用程序配置代码部分是:
<!-- exposes myService as BlazeDS destination -->
<flex:remoting-destination ref="producer" />
<flex:jms-message-destination id="chatIn" jms-destination="parametros.modem03.fecRate" />
<amq:broker useJmx="false" persistent="false">
<amq:transportConnectors>
<amq:transportConnector uri="vm://localhost" />
</amq:transportConnectors>
</amq:broker>
<!-- ActiveMQ destinations to use -->
<amq:topic id="parametros.modem01.fecRate" physicalName="parametros.modem01.fecRate"/>
<amq:topic id="parametros.modem02.fecRate" physicalName="parametros.modem01.fecRate2"/>
<amq:topic id="parametros.modem03.fecRate" physicalName="parametros.modem01.fecRate3"/>
<amq:topic id="parametros" physicalName="parametros.*.*"/>
<!-- JMS ConnectionFactory to use, configuring the embedded broker using XML -->
<amq:connectionFactory id="connectionFactory" brokerURL="vm://localhost"/>
我需要帮助
我怎样才能最大限度地减少这个时间?
【问题讨论】:
标签: apache-flex jms message activemq blazeds