Migrate close(long, TimeUnit) to close(Duration)
ProprietaryKafka 3.0 removed close(long, TimeUnit) from the consumer, producer and admin clients in favor of close(Duration). A TimeUnit constant becomes the matching Duration factory, such as Duration.ofSeconds(..); any other unit becomes Duration.ofMillis(unit.toMillis(timeout)), as the removed methods did.
io. moderne. kafka. MigrateClientCloseToDurationmod run . --recipe= io. moderne. kafka. MigrateClientCloseToDurationInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.