How and why Java 8+ infers method reference as consumer?

I was exploring some new things related to JDK 8, in particular the Refrence Methods and Iterable’s new forEach method as below:-

public class Runner {      public static void main(String[] args) {         String[] testArgs = new String[]{"test","123","456"};         Arrays.asList(testArgs).forEach(Runner::main);     }      public static String main(String s) {         System.out.println(s);         return s;     }  } 

This works as required, but as i see the forEach method in the java.lang.Iterable it is like below, accepting and expecting Consumer<? super T> action

default void forEach(Consumer<? super T> action) {     Objects.requireNonNull(action);     for (T t : this) {         action.accept(t);     } } 

Now coming to the question -> why and how is the JDK considering method reference as the Consumer type?

Kafka consumer : Resetting offset for partition xxxx1-0 to offset 25143.Every time I start it

Toptic-A:

o.a.k.c.c.i.ConsumerCoordinator - [Consumer clientId=consumer-1, groupId=group-5] Revoking previously assigned partitions [] o.a.k.c.c.i.AbstractCoordinator - [Consumer clientId=consumer-1, groupId=group-5] (Re-)joining group o.a.k.c.c.i.AbstractCoordinator - [Consumer clientId=consumer-1, groupId=group-5] Successfully joined group with generation 1 o.a.k.c.c.i.ConsumerCoordinator - [Consumer clientId=consumer-1, groupId=group-5] Setting newly assigned partitions [A1-0] o.a.k.c.consumer.internals.Fetcher - [Consumer clientId=consumer-1, groupId=group-5] Resetting offset for partition A1-0 to offset 25143. 

last message:

o.a.k.c.consumer.internals.Fetcher - [Consumer clientId=consumer-1, groupId=group-5] Resetting offset for partition A1-0 to offset 25143. 

This causes me to reset the offset every time I start,Let’s say I run to number 25200,then I turn off that,the offset is reset to 25143 the next time I start, but I want to continue with the last offset.

This is another toptic,and this is the normal result I want:
Toptic-wallet:

org.apache.kafka.clients.Metadata - Cluster ID: iQU30Fo1TViA2rkH9cxVYQ o.a.k.c.c.i.AbstractCoordinator - [Consumer clientId=consumer-3, groupId=wallet-1] Discovered group coordinator localhost:9092 (id: 2147483646 rack: null) o.a.k.c.c.i.ConsumerCoordinator - [Consumer clientId=consumer-3, groupId=wallet-1] Revoking previously assigned partitions [] o.a.k.c.c.i.AbstractCoordinator - [Consumer clientId=consumer-3, groupId=wallet-1] (Re-)joining group o.a.k.c.c.i.AbstractCoordinator - [Consumer clientId=consumer-3, groupId=wallet-1] Successfully joined group with generation 13 o.a.k.c.c.i.ConsumerCoordinator - [Consumer clientId=consumer-3, groupId=wallet-1] Setting newly assigned partitions [blockaddresscomplete3-0] 

How should I set Toptic-A.

Are external consumer flashes becoming useless?

I am currently looking at flashes a lot and it appears to me that camera and flash producers are making it increasingly hard to derive any value from an external flash.

I have one old flash with a guide number of 40 that has a fixed angle head sufficient for f=35mm, so it is advertised with a guide number of 40. There is an optional zoom head with its own guide number tables, having 50 at f=70mm, 53 at f=100mm and 70 at f=200mm.

Now I get to an old flash with built-in zoom reflector covering a range from f=24mm to f=100mm (basically you pull it out for longer range). That one is advertised with a guide number of 35. Consulting the sliderule style calculator on its back makes it possible to figure out that this guide number holds for f=50mm. At f=100mm, it would have about 44, at f=24mm (zoom head not extended at all) about 26. Ok, specifying at f=50mm seems sort-of a fair compromise even though the fixed-head flashes would always cover a wider angle than that (but not 24mm for sure).

So now I look at current offerings of the same manufacturer and you don’t even get to figure out the guide number at all. They advertise a guide number of 36 but there is (at f=105mm) in the small print, so small that several dealers are stating that this is the guide number at f=50mm. So what does the instruction leaflet say? I mean, apart from “we do everything automatically, don’t bother”? Looking at manual specification of flash power tells you you can reduce up to M/128 and with regard to the required reduction, consult a flash exposure meter.

Come again?

To make comparison and reuse harder, everyone has his own through-the-lens measuring systems. While this proliferation started in analog times already, digital has made it worse. I’d expect third-party flash manufacturers to produce multi-standard flashes, but you have to buy your flash for your particular camera manufacturer (and sometimes type). The adapter system SCA3000 is on the way out.

Now one of the main points of an external flash is being able to compose a scene which more often than not means that the external flash is not being the sole responsible light source. As a consequence, any automatism for determining its strength is likely to turn out problematic since it is looking at things it is not responsible for.

So my impression is that “modern” flashes are weak and the manufacturers don’t even tell you how weak they are. If a flash is the sole light in a scene and a direct light (which makes its automatic zoom action desirable in the first place), that’s sort of ok and modern sensors allow accommodation with higher ISO values without too much damage.

But as a competing light source, it has to hold its own against (at worst) the sun in backlit situations. And you cannot raise the ISO for that.

So my impression is that consumer external flashes move in a direction where they don’t offer a lot any more over built-in camera flashes (short of a swiveling/tilting head) which would doom them into becoming spurious.

Am I wrong with that impression?