stan.java icon indicating copy to clipboard operation
stan.java copied to clipboard

Expose ackInbox from Message

Open gunnaringe opened this issue 4 years ago • 2 comments

The only way to acknowledge a message today is by calling Message.ack().

Would it be possible to get hold of the subscription or ackInbox from the message so that we could access it from within the subscription callback?

The background for this is that we are exposing a gRPC API using STAN as a backend, and allow the client of the API to invoke a ack on our side. Ideally, we would have a method like StreamingConnection.acknowledge() that was triggered by a API call, but creating the ack proto and sending it in the same manner as the Message would also be possible.

Is this something you would consider?

That is basically making Message.getSubscription() public instead of package-private.

gunnaringe avatar Jan 23 '20 15:01 gunnaringe