DEV Community

vikrampawar
vikrampawar

Posted on

1

What is a Message?

What is a Message?

Here is a good definition of a Message.

I want to develop your intuition about a Message, so I'll elaborate this concept.

Message is an overused word. I want to develop intuition about a Message as used in Software Development.

Now let us suppose two people Alice and Bob want to communicate. If Alice shouts at Bob, we can't say Alice has given a Message to Bob. If instead, Alice tells Charlie something about Bob, and Charlie goes and tells it to Bob, we can say Charlie has passed on a Message to Bob.

What is the difference between the two situations? Of course, I introduced Charlie. But, Alice could have written the same thing in a piece of paper and sent that to Bob, or Alice could have sent an email or a text that has the same content, and in all these cases, we would say that Alice has sent Bob, a Message.

So, the fundamental thing that makes a Message a Message is that it leaves one person and then goes to another person. It has an independent existence outside of both people. And, because it leaves one person and then goes to another person, a Message by necessity needs to have the following information for it to be considered a Message.

It needs to have the information about where is it coming from, where is it going to, what is it about, and finally the actual content. These are called Sender, Recipient, Type (Subject) and Payload, respectively. The Sender, Recipient and Type are grouped together as a Header.

The same concept is used when information leaves one Application and goes to another Application.

An email, or a text, that we send is a Message. It has a Header, i.e, Sender, Recipient and Type along with the Payload.

A Message can be a lot more things, it can have a lot more information, but the Header and the Payload are the absolute minimum information that it needs to have for it to be able to leave one person or an Application, be independent, and reach the right Recipient.

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay