Skip to content

Tags: swift-server/RediStack

Tags

1.1.2

Toggle 1.1.2's commit message

Verified

This commit was signed with the committer’s verified signature.
Mordil Nathan Harris
Get pubsub numsub working

This was a cherry-pick of 3ca471b

2.0.0-alpha.3

Toggle 2.0.0-alpha.3's commit message
Get pubsub numsub working

1.1.1

Toggle 1.1.1's commit message
Get pubsub numsub working

2.0.0-alpha.2

Toggle 2.0.0-alpha.2's commit message

Verified

This commit was signed with the committer’s verified signature.
Mordil Nathan Harris
[Docs] Update README to include new dependency

2.0.0-alpha.1

Toggle 2.0.0-alpha.1's commit message

Verified

This commit was signed with the committer’s verified signature.
Mordil Nathan Harris
[Docs] Update README to use emoji instead of markdown for docsgen

1.1.0

Toggle 1.1.0's commit message

Verified

This commit was signed with the committer’s verified signature.
Mordil Nathan Harris
81 -- Add Configuration types for initialization

1.0.0

Toggle 1.0.0's commit message

Verified

This commit was signed with the committer’s verified signature.
Mordil Nathan Harris
Change RedisConnection to end subscriptions when not allowed

Motivation:

When `RedisConnection.allowSubscriptions` is set to `false`, the connection could still be in a subscription state
leaving further commands to fail slowly from a full roundtrip to Redis, rather than succeeding as expected.

This changes the implementation so that it triggers a full unsubscribe from patterns and channels when set to `false`.

Modifications:

- Change: `RedisConnection.allowSubscriptions` to call `unsubscribe()` and `punsubscribe()` when set to `false`
- Change: `RedisPubSubHandler` to prefix storage of all dictionary keys to avoid name clashes between pattern and channel subscriptions

Result:

Developers should now have more deterministic and unsurprising behavior with PubSub
in regards to subscription management and connection state.

1.0.0-rc.2

Toggle 1.0.0-rc.2's commit message

Verified

This commit was signed with the committer’s verified signature.
Mordil Nathan Harris
Add default buffer connectionRetryTimeout to avoid literal immediate …

…timeouts

Motivation:

When trying to allow users to configure the connection retry timeout offset,
not having a value provided (deadline of `now`) caused all attempts to use the pool to fail.

Modifications:

- Change: RedisConnectionPool to always have a timeout offset defined

Result:

If users don't specify any value, then the default of 60 seconds will be used.

If users specify "nil" (or `.none`) as the timeout, then a minimum of 10 milliseconds will be used to avoid immediate timeouts

Otherwise, use the user's specified `TimeAmount` as the offset of the timeout

1.0.0-rc.1

Toggle 1.0.0-rc.1's commit message

Verified

This commit was signed with the committer’s verified signature.
Mordil Nathan Harris
Add configuration option for RedisConnectionPool lease timeout

Motivation:

With RedisConnectionPool a timeout is provided to prevent infinite loops of
retrying connections, but right now it is hardcoded to 60 seconds.

Users of downstream projects such as Vapor are noticing a "regression" of sorts, as previously
EventLoopFutures would fail immediately if a connection was not made available.

Modifications:

- Add: `connectionRetryTimeout` parameter to `RedisConnectionPool` initializer that still defaults to 60 seconds
- Change: RedisConnectionPool to use the new parameter if available to offset a deadline from "now"

Result:

Users can now configure the connection pool to fail immediately if connections are not available.

1.0.0-beta.2

Toggle 1.0.0-beta.2's commit message

Verified

This commit was signed with the committer’s verified signature.
Mordil Nathan Harris
Add support for PubSub

Motivation:

One of the great features of Redis is being able to subscribe and receive messages published to specific channels
as a way of acting as a message queue for processing jobs.

PubSub requires a specific understanding of the connection model that can only be implemented directly in this library.

Modifications:

- Add: `RedisPubSubHandler` to sit in front of `RedisCommandHandler` to manage subscription callbacks and Redis registration
- Add: `publish` and the `pubsub` commands
- Add: `addPubSubHandler` extension to `NIO.Channel`
- Add: Type-safe String wrapper of `RedisChannelName` for PubSub methods
- Add: `pubsubSubscriptionNotFound` error case
- Add: `isSubscribed` property to `RedisConnection`
- Add: `availableConnectionCount` and `leasedConnectionCount` properties to `RedisConnectionPool`
- Add: Metrics for PubSub
- Add: `makeNewPool` factory method to `RedisConnectionPoolIntegrationTestCase`
- Change: `RedisClient` to require methods for PubSub management, as they are intrinsicly tied to the client's connection model
- Change: Parsing of `PING` response for handling special case in PubSub mode
- Rename: `ActiveConnectionGauge` to `RedisMetrics.IncrementalGauge`

Result:

Developers will now be able to use Redis in PubSub mode with both connections and pools.

This resolves #6