GraniteDS
  1. GraniteDS
  2. GDS-802

Gravity does not reconnect when the connection between app server and JMS breaks/reconnects

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0_RC2
    • Fix Version/s: 3.0.0.M1
    • Component/s: JMS Integration
    • Labels:
      None

      Description

      I'm running JMS messages from ActiveMQ (standalone, not VM) to Flex using Gravity.

      When my application server loses the connection to ActiveMQ it automatically reconnects after a short time and continues to receive messages. However when this happens the Flex clients also lose their connection but never reconnect. The Flex app needs to be restarted to regain the connection.

      Flex should reconnect automatically or otherwise nicely handle.

      One way to reproduce:
      Run ActiveMQ on localhost (or wherever)
      Create a grails project
      Install GDSFlex
      Create Flex project and configure gravity with JMS to connect to ActiveMQ
      Send messages to the relevant Topic. They will be handled by Flex.
      Break the connection to ActiveMQ eg. by restarting ActiveMQ
      Send messages to the relevant Topic. They will not be handled by Flex.
      Reload Flex application
      Send messages to the relevant Topic. They will be handled by Flex.

        Activity

        Hide
        William Draï added a comment -
        Not absolutely sure, but it should be fixed since 2.3.x.
        It looks like the same case than server failover when clustering ActiveMQ instances.
        Show
        William Draï added a comment - Not absolutely sure, but it should be fixed since 2.3.x. It looks like the same case than server failover when clustering ActiveMQ instances.
        Hide
        John Fletcher added a comment -
        Nah it doesn't work. What does work is to disconnect from the channel and then reconnect, like:

        consumer.unsubscribe();
        consumer.disconnect();
        var channelSet:ChannelSet = new ChannelSet();
        channelSet.addChannel(ServerConfig.getChannel(Globals.ID_GRAVITY_CHANNEL));
        consumer.channelSet = channelSet;
        consumer.destination = topic;
        consumer.subscribe();

        But it doesn't reconnect automatically.
        Show
        John Fletcher added a comment - Nah it doesn't work. What does work is to disconnect from the channel and then reconnect, like: consumer.unsubscribe(); consumer.disconnect(); var channelSet:ChannelSet = new ChannelSet(); channelSet.addChannel(ServerConfig.getChannel(Globals.ID_GRAVITY_CHANNEL)); consumer.channelSet = channelSet; consumer.destination = topic; consumer.subscribe(); But it doesn't reconnect automatically.
        Hide
        John Fletcher added a comment -
        (tried with 2.3.1)
        Show
        John Fletcher added a comment - (tried with 2.3.1)

          People

          • Assignee:
            Franck Wolff
            Reporter:
            John Fletcher
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: