go-cloud: pubsub: support providers that don't do acks

NATS and Redis pubsub don’t have acking, and it doesn’t make sense to try to shoehorn them in by making message acks a no-op. That would mean the application code would be misleading.

To support pubsub providers without acks, I propose to add the following new types:

pubsub.FAFSubscription, whose Receive method returns a pubsub.FAFMessage pubsub.FAFMessage that is mostly like a pubsub.Message but has no Ack method or associated bookkeeping

and corresponding interfaces within pubsub/driver. FAF here stands for “Fire and Forget”.

Drivers would either implement driver.Subscription or driver.FAFSubscription, but probably not both.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 38 (35 by maintainers)

Most upvoted comments

Not sure I am liking FAF or that a message changes due to its Ack methods. If the message is truly at most once than Ack would be a no-op.