Skip to content

Cannot set config value to empty string using Lettuce #2798

Closed
@marcusdacoregio

Description

@marcusdacoregio

The Redis documentation says (emphasis by me):

Notifications are enabled using the notify-keyspace-events of redis.conf or via the CONFIG SET.
Setting the parameter to the empty string disables notifications.

However, when I try to do:

connection.serverCommands().setConfig("notify-keyspace-events", "").then()

An error is thrown:

Caused by: java.lang.IllegalArgumentException: Value must not be null or empty
	at org.springframework.util.Assert.hasText(Assert.java:240)
	at org.springframework.data.redis.connection.lettuce.LettuceReactiveServerCommands.setConfig(LettuceReactiveServerCommands.java:133)

Is this expected?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions