Skip to content

Publisher confirms #14

@podung

Description

@podung

Split out from issue #11

I would like to see publisher confirms added to the library, to support the acks/nacks from the server when putting an item on the queue. There would need to be an api to configure that certain messages should fail to be acked from the server:

connection = MockBunny.new.start
channel = connection.create_channel
exchange = channel.direct(:some_exchange)

expect(exchange).to receive(:publish).with(some_data).and_nack

exchange.publish(some_data)

expect(channel.wait_for_confirms).to eq false
expect(channel.nacked_items.count).to be 1

I'll work on a PR soon. Any thoughts on the API or how it should work for exchanges vs queues would be great.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions