adjust / rmq

Message queue system written in Go and backed by Redis
MIT License
1.57k stars 206 forks source link

Queue's named non-deterministically #54

Closed ClayShentrup closed 6 years ago

ClayShentrup commented 6 years ago

I'm trying to send messages from a Rails app to a Go app, so the producing side needs to know the queue name. But there's this line that uses a random string.

name := fmt.Sprintf("%s-%s", tag, uniuri.NewLen(6))

Is this just not a supported use case?

wellle commented 6 years ago

@ClayShentrup: We use random parts in connection names and consumer names so we can refer to them explicitly. This is important when handing their heartbeats and unacked messages.

Queue names however don't have any random part in them. So you should be able to build a producer in Rails.

ClayShentrup commented 6 years ago

@wellle Thanks for the quick response!

I may be confused. I'm able to consume messages that I post in Go. But if I do something like this:

queue = Redis::List.new('flycast_requests')
queue.push("some payload")

I never see it handled on the Go side.

ClayShentrup commented 6 years ago

Ah, I see that the key should be rmq::queue::[flycast_request]::ready in my case.

Still not going through. Both the services are using DB 0. Hmm...

ClayShentrup commented 6 years ago

OK, I'm convinced the issue is on the Ruby side. I can see the values coming in from the Go side via redis-cli. Thank you again.

wellle commented 6 years ago

You're welcome, good luck on the Ruby side 👍