Skip to content

Commit

Permalink
fix: add configuration property that allows disabling setting of noti…
Browse files Browse the repository at this point in the history
…fy-keyspace-events on redis server

Before this fix, when starting encore, spring data redis
 would try to use the CONFIG command to set
notify-keyspace-events on the redis server. If the server did not support the CONFIG command,
which is the case in many managed redis services, encore would fail to start.

With this fix, setting the property redis.keyspace.disable-config-notifications
to true string will stop spring data redis from trying to change the config.
If the property is not set, or set to true, spring data redis will behave as before,
that is use the CONFIG command to set 'notify-keyspace-events'.

Note that this fix does not seem to work when native compile is used.

Signed-off-by: Gustav Grusell <[email protected]>
  • Loading branch information
grusell committed Jun 18, 2024
1 parent f1a7538 commit c3f8aaf
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ import se.svt.oss.mediaanalyzer.file.VideoFile
SegmentProgressEvent::class,
QueueItem::class
)
@EnableRedisRepositories(enableKeyspaceEvents = RedisKeyValueAdapter.EnableKeyspaceEvents.ON_STARTUP)
@EnableRedisRepositories(
enableKeyspaceEvents = RedisKeyValueAdapter.EnableKeyspaceEvents.ON_STARTUP,
keyspaceNotificationsConfigParameter = "#{\${redis.keyspace.disable-config-notifications:false} ? '' : 'Ex'}"
)
class RedisConfiguration {

@Bean
Expand Down

0 comments on commit c3f8aaf

Please sign in to comment.