assembla / cony

Simple AMQP wrapper around github.com/streadway/amqp
BSD 2-Clause "Simplified" License
174 stars 46 forks source link

Inspect message and consumer counts for a queue. #16

Open phensley opened 8 years ago

phensley commented 8 years ago

re #34

kron4eg commented 8 years ago

@phensley Thank you! Looks good to me but before merge I'd like to see in what context this will be used. Could you please provide more background on this?

phensley commented 8 years ago

The use case we have is for a daemon to be aware of a queue's current size, and whether there are > 0 consumers, and be able to take action.

kron4eg commented 8 years ago

@phensley would it make it for you if cony will expose current *amqp.Connection through some getter?

phensley commented 8 years ago

@kron4eg You could export Connection() (*amqp.Connection, error) and I could move the QueueInspect method into my own code.

kron4eg commented 8 years ago

@phensley yeah, that's what I meant.

phensley commented 8 years ago

@kron4eg Works for me.