Closed celcius112 closed 4 years ago
What if we changed it to ack(Collection<? extends AcknowledgeablePubsubMessage> messages)
? I think that would work without introducing a breaking change.
That's what I have in mind. However this is a breaking change, albeit a minor one, for those implementing PubSubSubscriberOperations
since the signature of the public interface's methods does change.
I wouldn't mind making this change, but I do not consider myself being in the best place to take this decision :)
Callers of this method do not need to change their code. So, it's backwards compatible in that sense. Feel free to propose the change in a PR, we can go from there. Thanks!
Good enough for me :) Thank you for your time
At the moment PubSubSubscriberOperations's
#ack
,#nack
and#modifyAckDeadline
methods accept a Collection ofAcknowledgeablePubsubMessage
. It would be appreciated to bound this Collection so that, for instance, a List ofConvertedAcknowledgeablePubsubMessage
could be used as parameter.This would bring a breaking change as the signature of the public interface
PubSubSubscriberOperations
would be modified.As a temporary workaround, we can wrap our list in a
Collections.unmodifiableList
in order to downcast the type, for instancebut this is less than optimal.
If necessary, and since the modification is quite trivial, I can provide a PR.