Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting rmq fails: wrapper.rawClient.FlushDb undefined #71

Closed
rverton opened this issue Oct 14, 2019 · 7 comments
Closed

Getting rmq fails: wrapper.rawClient.FlushDb undefined #71

rverton opened this issue Oct 14, 2019 · 7 comments

Comments

@rverton
Copy link

rverton commented Oct 14, 2019

Hi,
I am running Go 1.13.1 here (go version go1.13.1 darwin/amd64). When getting/downloading rmq, I get an error that wrapper.rawClient.FlushDb is not defined. I guess it's because something in the redis lib changed.

$ go get github.com/adjust/rmq
# github.com/adjust/rmq
/Users/robin/go/src/github.com/adjust/rmq/redis_wrapper.go:85:19: wrapper.rawClient.FlushDb undefined (type *redis.Client has no field or method FlushDb)

If there is anything else you need from me, just let me know.

Thanks,
Robin

@wellle
Copy link
Member

wellle commented Oct 14, 2019

Thanks for reporting!

Looks like they renamed the function from FlushDb to FlushDB in redis/go-redis@f1ed2ad.

We'll look into fixing this here 👍

@wellle
Copy link
Member

wellle commented Oct 15, 2019

@rverton: So actually the issue is a bit different. rmq still uses https://github.com/golang/dep, and in our https://github.com/adjust/rmq/blob/master/Gopkg.toml file we declare that rmq expects go-redis version 6.9.2.

You seem to be using go-redis master, which contains the breaking change mentioned above. We will probably add go module support for rmq later #67.

For now I'd suggest you try using go-redis version 6.9.2 and then rmq should work.

Please let me know if that works for you. Thanks!

@toni-moreno
Copy link

Hello, Here the same error. first. @wellle , and after doing git checkout 6.9.2 to the go-redis lib this happens when trying to run the producer.go example

vant@mypc:~/$ go run main.go 
2020/03/07 08:29:59 rmq redis error is not nil redis: can't marshal []string (consider implementing encoding.BinaryMarshaler)
panic: rmq redis error is not nil redis: can't marshal []string (consider implementing encoding.BinaryMarshaler)

goroutine 1 [running]:
log.Panicf(0x687fd8, 0x1d, 0xc0000d1dd8, 0x1, 0x1)
	/usr/local/go/src/log/log.go:345 +0xc0
github.com/adjust/rmq.checkErr(...)
	/home/vant/go/src/github.com/adjust/rmq/redis_wrapper.go:96
github.com/adjust/rmq.RedisWrapper.LPush(0xc0000b00f0, 0xc0000fe020, 0x1b, 0xc000012020, 0x1, 0x1, 0xc000012020)
	/home/vant/go/src/github.com/adjust/rmq/redis_wrapper.go:37 +0x15e
github.com/adjust/rmq.(*redisQueue).Publish(0xc000100000, 0xc000012020, 0x1, 0x1, 0x1)
	/home/vant/go/src/github.com/adjust/rmq/queue.go:97 +0x6a
main.main()
	/home/vant/proyectos/tokio/task_queue_poc/rmq/example/producer/main.go:24 +0x228
exit status 2

There is any way to fix this error?

@fmd97
Copy link

fmd97 commented Mar 8, 2020

same error

@wellle
Copy link
Member

wellle commented Mar 10, 2020

@toni-moreno @fmd97: I just merged #76 (thanks to @hishamkaram!). Can you try again? Thanks!

@fmd97
Copy link

fmd97 commented Mar 10, 2020

@wellle everything is fine now, thanks !

@wellle
Copy link
Member

wellle commented Mar 11, 2020

Thanks for checking, I'll close the issue 👍

@wellle wellle closed this as completed Mar 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants