0 Replies Latest reply on Nov 6, 2006 7:53 AM by yaroxyz1

    JMS messages sometimes not received by Flex client

      We have a problem that Flex client is sometimes not able to receive JMS messages from a JBoss JMS Queue. Most of the time it works, but if users logout/login using the same account frequently or you restart JBoss 4.0.4 during their session then it might happen. Then it doesn't work at all even if you wait. Client is able to send messages when this problem occurs, which can then be intercepted by other clients but cannot receive any messages from himself or from the others. JBoss 4.0.4 is running in cluster mode. Could it be that there is an old frozen session which is receiving the messages meant for the new client?(consumer selector is unique to each user, but if a user logs in twice, the same selector is used) If I run 2 instances of my JMS test consumer using the same selector then the consumer which registered later receives the messages and if it quits, then the older consumer starts receving them. This doesn't occur in Flex.
      Flex is running on Tomcat 5.5.17.

      Our messaging-config.xml is

      <?xml version="1.0" encoding="UTF-8"?>
      <service id="message-service"

      <adapter-definition id="actionscript" class="flex.messaging.services.messaging.adapters.ActionScriptAdapter" default="true" />
      <adapter-definition id="jms" class="flex.messaging.services.messaging.adapters.JMSAdapter"/>

      <destination id="JMSQueueB">
      <channel ref="my-rtmp"/>
      <channel ref="my-secure-amf"/>
      <adapter ref="jms"/>

      Part of our actionscript code:

      pmConsumer = new Consumer();
      pmConsumer.destination = "JMSQueueB";
      pmConsumer.selector = "some jms selector ....";
      pmConsumer.addEventListener(MessageEvent.MESSAGE, presenceMessageHandler);
      pmConsumer.addEventListener(MessageFaultEvent.FAULT, faultHandler);
      pmConsumer.addEventListener(ChannelFaultEvent.FAULT, channelFaultHandler);

      Also Flex seems to be handing channel switching incorrectly, if rtmp port is firewalled, it won't use amf properly even though it was given 2 channels in configuration file and JMS messaging doesn't work. We have to alter the channel set during runtime.

      Flex also doesn't automatically switch to other JMS server if one goes down. Is this a feature or a bug? We have to reset producer and consumer in order for this to work.