About pubsub,Message Display Issue

I’ve encountered this issue:
When I publish a message to a certain topic and simultaneously subscribe to it, I first see the message I published myself. Now when I use another device to publish a message, this message always appears immediately after my previous message, with no gap between the two. Only when I publish another message from a different device does it start on a new line. Subsequent messages received will also start on a new line. Why is this happening?