coralproject / pillar

Deprecated: Service layer for the Coral ecosystem
Other
4 stars 1 forks source link

auto-ack off #148

Closed alexbyrnes closed 8 years ago

alexbyrnes commented 8 years ago

What does this PR do?

Turns off auto ack. The library we're using has a memory problem caused by auto ack.

https://github.com/streadway/amqp/issues/149

How do I test this PR?

publish events to rabbitmq from pillar and consume them in another service using pillar's amqp.go. You should see publishes, delivers, and acks. You shouldn't see any no "Deliver (noack)" in the rabbitmq admin console (http://localhost:15672/ if you're running it locally).

@coralproject/backend

gabelula commented 8 years ago

Are you calling the delivery.ack somewhere else?

alexbyrnes commented 8 years ago

It gets called in the subscriber aka wake.


    msgs, err := mq.Receive()
    failOnError(err, "Failed to register a consumer")

    forever := make(chan bool)
    go func() {
        for d := range msgs {

                        // some stuff

            d.Ack(false)
        }
    }()
gabelula commented 8 years ago

And that is code is not here?

The code that wake is using is this one: https://github.com/coralproject/pillar/blob/master/app/wake/listener/listener.go

right?

alexbyrnes commented 8 years ago

yes that's a good point. I didn't realize there was a copy in pillar too

kgardnr commented 8 years ago

We should either delete this if it didn't fix the issue, or go ahead and merge it. I'll move to Backlog for now.

alexbyrnes commented 8 years ago

143 was the fix. I think we should delete this to keep things simple. We can restore it if we need acks at some point.

jde commented 8 years ago

Closing as unneeded.