Skip to content

RediStack 2.0.0 Gamma 1

Pre-release
Pre-release
Compare
Choose a tag to compare
@Mordil Mordil released this 13 Dec 03:30
· 3 commits to master since this release
3f7fedb

API Docs are always available at docs.redistack.info

Announcement

📢 RediStack is back in an alpha phase where breaking changes are being allowed in the 2.x release.

This is due to the additional help and insight into the library's needed evolution by @fabianfett.

Given that SemVer rules state that pre-release identifiers are resolved in lexicographical order, and RediStack has already used alpha, beta, and experimental, RediStack will use the following names for the "new" alpha & beta releases:

  • alpha => Gamma
  • beta => Lambda

Changes

Major

  • Pub/Sub message and subscription handlers are now unified into a single closure !181
    • This introduces the type RedisPubSubEvent that you can now explicitly handle in a single closure
      let handler: RedisPubSubEventReceiver = { event in
          switch event {
          case let .subscribed(subscriptionKey, connectionCount):
              print("new subscription to \(subscriptionKey). This connection now has \(connectionCount) subscriptions")
      
          case let .unsubscribed(subscriptionKey, connectionCount, unsubscribeEventSource):
              print("unsubscribed from \(subscriptionKey) due to \(unsubscribeEventSource). This connection still has \(connectionCount) subscriptions")
      
          case .message(let publisher, let message):
              print("message from \(publisher): \(message)")
          }
      }
  • RedisClient.logging(to:) has been removed #115
    • It is now expected for you to explicitly provide a Logger instance to all method calls

Minor

  • RedisByteDecoder now conforms to NIOSingleStepByteToMessageDecoder !185
  • Added new RedisGracefulConnectionCloseEvent marker type that Redis channels will respond to for shutting down connections !190

Patch

  • Fix deprecation warning by switching from Lock to NIOLock !180
  • Fix deprecation warning by switching from NIOAtomic to ManagedAtomic !179
  • Connections will no longer send QUIT commands to Redis as part of the shutdown process !187
  • RPOPLPUSH and BRPOPLPUSH commands no longer fail to convert responses on keys that are empty #116

Misc

  • RediStack now explicitly depends on SwiftAtomics !184
  • RediStack now explicitly depends on individual NIO modules, rather than the umbrella module !186