views:

31

answers:

1

Hi,

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.fecRate3"/>
<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?

A: 

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

David Collie
Thank you for reponse!! Really helped your answer me
Fran