开发者

How to reduce the time request between producer (Java) and consumer (Flex) with JMS Message?

I have implemented application client-server with spring blazeDs message services using JMS message destination.

The idea is a producer declared in Java send message using activeMQ and consumer declared in Flex receives them.

I have configured the AMFChannel with a polling interval 0, but I have seen when the consumer subscribes to the destination in Flex, the time request can be of up to 3 seconds.

The code in my services-config is:

<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>

and the part of my application-config code is:

<!-- 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.fecR开发者_运维问答ate3"/>
<amq:topic id="parametros"  physicalName="parametros.*.*"/>




 <!-- JMS ConnectionFactory to use, configuring the embedded broker using XML -->
 <amq:connectionFactory id="connectionFactory" brokerURL="vm://localhost"/>

I need help

How I can reduce this time to the maximum?


Use a Streaming AMF channel instead http://livedocs.adobe.com/blazeds/1/blazeds_devguide/help.html?content=lcconfig_3.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜