Results 1 to 10 of 10

Thread: Queue Channel backed by GemfireMessageStore restricted to LOCAL_PERSISTENT?

  1. #1
    Join Date
    Dec 2010
    Posts
    7

    Default Queue Channel backed by GemfireMessageStore restricted to LOCAL_PERSISTENT?

    My team has recently been working on putting together a Spring Integration system that uses, as an error channel, a GemfireMessageStore-backed queue channel. Our initial attempts were to use a PROXY (failed miserably - all messages were dropped.) We then attempted a CACHING_PROXY. In the CACHING_PROXY model, the queue would work until the system failed, then when the system was brought back up, all of the messages resident in the GemfireMessageStore were subsequently dropped - unless we wrote to the GemfireMessageStore before it had emptied itself!)

    It now appears that if we run with our GemfireMessageStore set to a LOCAL_PERSISTENT, things work out okay. However, this isn't really what we want to have happening. Ideally, we'd want the PROXY setup, and if that wouldn't work we'd want the CACHING_PROXY setup.

    Which part of the picture are we not understanding, here?

    Here are the relevant parts of the setup:

    Code:
       <bean id="gemfireMessageStore" class="org.springframework.integration.gemfire.store.GemfireMessageStore">
          <constructor-arg ref="MessageStoreCache"/>
       </bean>
    
       <int:channel id="failedDeliveryMessageStoreQueueChannel">
          <int:queue message-store="gemfireMessageStore"/>
       </int:channel>
    
       <gfe:client-cache id="MessageStoreCache" pool-name="MessageStorePool"/>
       <gfe:client-region id="messageStoreRegion" cache-ref="MessageStoreCache" shortcut="LOCAL_PERSISTENT"/>
    
       <gfe:pool id="MessageStorePool" subscription-enabled="true">
          <gfe:server host="localhost" port="40404"/>
       </gfe:pool>
    The 'int' ns is, of course, Spring Integration, and 'gfe' is Gemfire.

    Any help would be greatly appreciated.

  2. #2
    Join Date
    Oct 2004
    Location
    Berwyn, PA
    Posts
    56

    Default

    I can look into this. Can you tell me what version of spring-gemfire and gemfire you are using?
    David Turanski
    SpringSource Senior Software Engineer

  3. #3
    Join Date
    Dec 2010
    Posts
    7

    Default

    You bet.

    Spring-Gemfire: 1.1.1.RELEASE
    Gemfire: 6.6.2

    Thx.

  4. #4
    Join Date
    Oct 2004
    Location
    Berwyn, PA
    Posts
    56

    Default

    I assume you have the region 'messageStroreRegion' configured in the cache server? If so, how is it configured?
    David Turanski
    SpringSource Senior Software Engineer

  5. #5
    Join Date
    Dec 2010
    Posts
    7

    Default

    When attempting to use the PROXY and the CACHING_PROXY shortcuts, we did have the messageStoreRegion defined in the cache server. On the LOCAL_PERSISTENCE, no (as, if I'm not mistaken, it does not matter.)

  6. #6
    Join Date
    Dec 2010
    Posts
    7

    Default

    When it was defined on the cache server, it was defined as:

    Code:
    <?xml version="1.0"?>
    
    <!DOCTYPE cache PUBLIC
      "-//GemStone Systems, Inc.//GemFire Declarative Caching 6.5//EN"
      "http://www.gemstone.com/dtd/cache6_5.dtd">
    <cache>
    
       <cache-server port="40404"/>
    
       <disk-store name="ds1" auto-compact="true" max-oplog-size="1024" queue-size="10000" time-interval="60">
          <disk-dirs>
             <disk-dir dir-size="4096">DatastoreDir</disk-dir>
          </disk-dirs>
       </disk-store>
    
       <region name="messageStoreRegion">
          <region-attributes refid="REPLICATE_PERSISTENT" disk-store-name="ds1" disk-synchronous="false" scope="distributed-no-ack">
          </region-attributes>
       </region>
    
    </cache>

  7. #7
    Join Date
    Oct 2004
    Location
    Berwyn, PA
    Posts
    56

    Default

    'PROXY' is what you ultimately want. This should maintain the state in the cache server and no messages should be lost. However when I set shortcut="PROXY" in your configuration , I get
    Code:
    Caused by: java.lang.UnsupportedOperationException: operation is not supported on a client cache
    	at com.gemstone.gemfire.internal.cache.GemFireCacheImpl.createRegionFactory(GemFireCacheImpl.java:4035)
    	at org.springframework.data.gemfire.RegionFactoryBean.lookupFallback(RegionFactoryBean.java:86)
    	at org.springframework.data.gemfire.RegionLookupFactoryBean.afterPropertiesSet(RegionLookupFactoryBean.java:59)
    	at org.springframework.data.gemfire.RegionFactoryBean.afterPropertiesSet(RegionFactoryBean.java:71)
    	at org.springframework.integration.gemfire.store.GemfireMessageStore.afterPropertiesSet(GemfireMessageStore.java:71)
    	... 40 more
    This is bug in GemfireMessageStore, due to Gemfire API changes introduced in 6.6.1. I will create a JIRA for it.
    David Turanski
    SpringSource Senior Software Engineer

  8. #8
    Join Date
    Dec 2010
    Posts
    7

    Default

    That is exactly the response we were getting!

    Nice to hear that we're not completely crazy on this side.

    Looking forward to the JIRA outcome.

    Thanks.

  9. #9
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    Actually it would be more appropriate if you guys raise a JIRA since you've discovered a problem and you can link it to this forum to maintain traceability. https://jira.springsource.org/browse/INT

    Thanks

  10. #10
    Join Date
    Oct 2004
    Location
    Berwyn, PA
    Posts
    56

    Default

    David Turanski
    SpringSource Senior Software Engineer

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •