You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now that master can require JDK 8 we can begin retrofitting the API to accept lambdas. For example, in some clients it's common to use lambdas as consumer delivery handlers. This is generally straightforward except for one case: cancellation handling and a single lambda
wouldn't work.
I propose that we add a Channel#basicConsume overload that accepts two lambdas instead of a Consumer instance:
A delivery handler
A cancellation handler
The text was updated successfully, but these errors were encountered:
Only basic.deliver and basic.cancel callbacks are covered.
They're likely to be the most commonly used. This can provide
a straightforward syntax when callbacks are simple (e.g. one line).
The Delivery wrapper class from RpcServer has been extracted as
a top level class: it's used in the deliver callback to avoid
having a lambda with 4 parameters.
Fixes#247
Now that master can require JDK 8 we can begin retrofitting the API to accept lambdas. For example, in some clients it's common to use lambdas as consumer delivery handlers. This is generally straightforward except for one case: cancellation handling and a single lambda
wouldn't work.
I propose that we add a
Channel#basicConsume
overload that accepts two lambdas instead of aConsumer
instance:The text was updated successfully, but these errors were encountered: