領先一步
VMware 提供培訓和認證,以加速您的進展。
了解更多我很高興代表 Spring 和 Apache Geode 社群宣布發布 Spring Session for Apache Geode and Pivotal GemFire (SSDG) 2.1.4.RELEASE
和 2.2.0.M2
版本。
SSDG 2.1.4.RELEASE
和 2.2.0.M2
現在都支援關閉客戶端訂閱的功能。 SSDG 不再需要啟用客戶端訂閱才能使用 Apache Geode 或 Pivotal GemFire 來管理您的 HTTP Session 狀態。但是,如果未明確啟用客戶端訂閱,則客戶端將不再收到來自其他客戶端訪問相同 (HTTP) Session 的 Session 事件通知。這在負載平衡、非黏性 Session 環境中是完全有可能的。
此外,SSDG 2.2.0.M2
添加了一個新的 Session 事件 SessionChangedEvent
,用於在 Session 狀態發生變化時(例如,更新時)通知「感興趣」的客戶端。 Session 更改事件實際上不是 Spring Session 核心的一部分,而是 Apache Geode & Pivotal GemFire 支援的一項功能。 這在客戶端想要知道 Session 狀態是否已更改的情況下非常有用,尤其是在高度並行的環境中。 當然,這只有在啟用客戶端訂閱時才有效。
提醒您,您可以使用以下配置啟用客戶端訂閱
在 "DEFAULT" Pool 上啟用客戶端訂閱
@ClientCacheApplication(subscriptionEnabled = true)
@EnableGemFireHttpSession(poolName = "DEFAULT")
class SpringSessionUsingApacheGeodeConfiguration { ... }
此外,如果您已配置專用的、已命名的連接 Pool
供 SSDG 使用,則您的配置將類似於
在目標 Pool 上啟用客戶端訂閱
@ClientCacheApplication
@EnablePool(name = "SessionPool", subscriptionEnabled = true)
@EnableGemFireHttpSession(poolName = "SessionPool")
class SpringSessionUsingApacheGeodeConfiguration { ... }
SSDG 2.1.4.RELEASE
位元可在 Maven Central 中取得,而 SSDG 2.2.0.M2
位元可在 Spring libs-milestone
儲存庫中取得。
此外,這兩個版本都將分別在即將推出的 Spring Boot 2.1.6.RELEASE
和 Spring Boot 2.2.0.M4
版本中提供。
一如既往,我們感謝並歡迎您的意見回饋。 請嘗試使用新版本,並告訴我們您的想法。
問題 | PR | StackOverflow