hreinhardt/amqp

Accessing BasicNack and BasicAck

Closed this issue · 7 comments

AckType is defined in Network.AMQP.Internal, but does not seem to be exported externally. Is there a way to get access to it to be able to write a confirmation listener effectively?

This looks like an oversight to me.

Would you be willing to make the change locally and test if the confirmation-listener feature actually works? Since nobody complained about the missing export until today, I'm not sure if anybody really tested it before.

I figured that might be the case - I've added AckType as an export and am testing it.

It seems to work - I've added a test case - not sure it is in the right place, but it seems to work.

joehealy@52fbe76

Also, there is a little bit of a mismatch between the Maybe Int that publishMsg returns and the Word64 of addConfirmationListener - not sure if it is worth rationalising that, or if we just put up with the fromIntegral when needed

It's definitely an inconsistency but I'm undecided whether they should both be Int or Word64. So I'm leaning towards just leaving it as-is for the moment.

That was my thought too. I don't have a lot of history with the library, but either change seemed unsatisfactory.

OK, we can always change it at a later time if necessary. Thanks for contributing!