Q:

Weird Behaviour of next() In Reactive Chain

To start with, here's my code:
public static void main(String[] args) {
    List<String> l1 = Arrays.asList("737", "747");
    Flux<String> f1 = Flux.fromIterable(l1);

    List<String> l2 = Arrays.asList("757", "777");
    Flux<String> f2 = Flux.fromIterable(l1);

   f1.mergeWith(f2)
    .doOnNext(a -> System.out.println(a))
    .next()
    .subscribe(a -> System.out.println(a));
}

Here's the output that I am expecting:
737

747

757

777

737

As the documentation of next() says, it takes the first element, creates a Mono out of it, and cancels the subscription.
The output that I am getting is:
737

737

A:

As you said the next() takes the first element of a flux create a Mono. A Mono is 0 or 1 value. So when subscribing you will only receive the first value of the original Flux.
Take a look at the marble:

See how the complete is emitted right after the first value.
So if we apply this to your code we have
737 -> 747 -> 757 -> 777 |

onNext

print 737

next()

737 -> |

subscribe()

print 737

