amqp091-go icon indicating copy to clipboard operation
amqp091-go copied to clipboard

Remove deprecated API functions

Open lukebakken opened this issue 2 years ago • 2 comments

Follow-up to https://github.com/rabbitmq/amqp091-go/pull/96

Version 2 should remove deprecated API functions and "clean up" those that are left, perhaps coming up with a better name than PublishWithDeferredConfirm.

To be honest if you're publishing without confirmations the function should be called PublishButDontComplainWhenYouLoseData

lukebakken avatar Jul 13 '22 13:07 lukebakken

Also note that context is no longer used in publishing (#195, discussion).

lukebakken avatar May 19 '23 13:05 lukebakken

I've been thinking of removing the deprecated functions and removing the *WithContext prefix, so that we go back to Publish() taking context as first argument. Same story for Consume, make the function that takes context the only one and remove the one that doesn't.

Since we are going 2.0, we could take this change to make these breaking changes.

Regarding #195, I think there is a point for using contexts in Publish, as it should not send the message if the context is cancelled. I don't think we can interrupt or cancel an RPC to the server once we sent the publish frame.

Zerpet avatar May 22 '23 08:05 Zerpet