Skip to main content

Messages

Introduction

An instance of an event is a "Message". It is also referred to as "Event Message" whenever there is an oppurtunity to give explicit clarity.

Put in other words, whenever your application sends a new occurence of an event, it is called "Message". You are actually "ingesting" new messages against an event.

event_type of a message identifies to which event an event message belongs to.

Sending a Message

A JSON Object posted to https://edge.teurons.com/neptune/events/ingest is how you send messages to Neptune.

The bare minimum object which you would be sending is:

{
"event_type": "request_otp_to_verify_email_during_registration",
}

You can enhance this object with lot more keys like:

{
"data": {
"name": "John",
"otp": 123456
},
"event_type": "request_otp_to_verify_email_during_registration",
}

You can even tell Neptune when this event occured and how you want this message should be identified:

{
"event_type": "request_otp_to_verify_email_during_registration",
"timestamp": 1644999639,
"message_id": "test-1644999639-staging-e84e50bd-81e5-4dc7-8d87-ac5824ed0b34"
}

Watching Messages

All messages come to "Stream" which is explored in Stream section of this documentation. How many messages are stored depends on the pricing plan you opted for. Depending on the plan, you can browse some or all messages sent to Neptune.

You can filter messages by event_type, user_id or even custom keys. You can learn more about this in Deep Dive on an Event Message.