arempe93 / bunny-mock

A mock client for RabbitMQ modeled after the Bunny client in ruby
http://www.rubydoc.info/github/arempe93/bunny-mock
MIT License
44 stars 37 forks source link

BunnyMock::Channel does not support acknowledge method #18

Open TimothyMDean opened 8 years ago

TimothyMDean commented 8 years ago

I have Bunny code that does manual acknowledgement of messages by passing manual_ack: true into the pop method of the Queue class. This allows the message to be redelivered if the consumer class fails to completely process the message.

To make this work, my code must manually acknowledge successful completion of message processing. It does this using the Channel class's acknowledge or ack method. That method is not currently implemented in the BunnyMock::Channel class.

Is is possible to add some sort of rudimentary mocking support for message acknowledgement methods?

arempe93 commented 8 years ago

If you have an idea of how to make this work, you can submit a PR for it. Or you could explain what needs to happen with regards to acks, nacks, and delivery tags if you have experience with them. Might improve turn around time from me trying to read through the docs :)

TimothyMDean commented 8 years ago

I will take a look when I get a chance to see what I can come up with.

baelter commented 8 years ago

Added a stub for it in https://github.com/arempe93/bunny-mock/pull/20