go-redis icon indicating copy to clipboard operation
go-redis copied to clipboard

Support the 'MONITOR' command

Open AlistairBurrowes opened this issue 2 years ago • 2 comments

The README has stated something like Redis 3 commands except QUIT, MONITOR, and SYNC. for 8 years or so. I am unclear if this deliberate, or if there might be an appetite to support the MONITOR command.

My company has a requirement for this. We may be able to contribute support, but of course guidance around implementation would be desirable. Can it be confirmed if MONITOR support fits the scope of this library?

In terms of implementation, I believe it would be something like SUBSCRIBE, but I would need to drill in further to understand the nuance. Thanks!

AlistairBurrowes avatar Mar 06 '22 22:03 AlistairBurrowes

From the documentation, MONITOR is just a debugging command, I don't know much about this command, maybe you can try the client.Do(ctx, cmd...) method?

monkey92t avatar Mar 18 '22 08:03 monkey92t

+1 for adding MONITOR. My use case is that I am writing tests for some code that depends on Redis. It would be useful to call MONITOR and output the commands to help debug test failures.

From the documentation, MONITOR is just a debugging command, I don't know much about this command, maybe you can try the client.Do(ctx, cmd...) method?

I tried, this but then subsequent redis commands result in an error pool.go:348: Conn has unread data.

armsnyder avatar Aug 11 '22 01:08 armsnyder

+1

lsne avatar Feb 27 '23 13:02 lsne

I also need this command support, for my Redis GUI Client. Tiny RDM

tiny-craft avatar Nov 07 '23 09:11 tiny-craft