Spring Integration
  1. Spring Integration
  2. INT-2552

GemFire MessageStore fails with client region

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.1
    • Fix Version/s: 2.2 M1
    • Component/s: GemFire Support
    • Labels:
    • Environment:
      SGF 1.1.1.RELEASE / Gemfire 6.6.1 +

      Description

      This configuration, using a client region to store messages in extenal cache server fails with an UnsupportedOperationException.

      <bean id="gemfireMessageStore" class="org.springframework.integration.gemfire.store.GemfireMessageStore">
            <constructor-arg ref="MessageStoreCache"/>
         </bean>
      
         <int:channel id="messageStoreQueueChannel">
            <int:queue message-store="gemfireMessageStore"/>
         </int:channel>
      
         <gfe:client-cache id="MessageStoreCache" pool-name="MessageStorePool"/>
         <gfe:client-region id="messageStoreRegion" cache-ref="MessageStoreCache" shortcut="PROXY"/>
      
         <gfe:pool id="MessageStorePool" subscription-enabled="true">
            <gfe:server host="localhost" port="40404"/>
         </gfe:pool>
      

        Activity

        Hide
        David Turanski added a comment -

        The problem is the GMS creates a region using RegionFactoryBean. In this case we have a client cache and client region correctly configured to store all messages immediately to a remote cache server. IMHO, the right thing to do in this case is add a setter for the region in GMS:

         <bean id="gemfireMessageStore"
                class="org.springframework.integration.gemfire.store.GemfireMessageStore">
            <property name="region" ref="messageStoreRegion"/>
         </bean>
        

        But if GMS has a reference to a region, it doesn't need the cache. Being optional, it probably should be changed to a property in a future release. cache and region are not really mutually exclusive - only the cache is not needed if the region is set.

        Show
        David Turanski added a comment - The problem is the GMS creates a region using RegionFactoryBean. In this case we have a client cache and client region correctly configured to store all messages immediately to a remote cache server. IMHO, the right thing to do in this case is add a setter for the region in GMS: <bean id= "gemfireMessageStore" class= "org.springframework.integration.gemfire.store.GemfireMessageStore" > <property name= "region" ref= "messageStoreRegion" /> </bean> But if GMS has a reference to a region, it doesn't need the cache. Being optional, it probably should be changed to a property in a future release. cache and region are not really mutually exclusive - only the cache is not needed if the region is set.
        Show
        David Turanski added a comment - https://github.com/SpringSource/spring-integration/pull/437

          People

          • Assignee:
            David Turanski
            Reporter:
            David Turanski
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: