syntax = "proto3";

import "github.com/golang/protobuf/ptypes/timestamp/timestamp.proto";

option go_package = "wire";

message HeaderV1 {
	// A message ID generated for the purpose of deduplication.
	bytes message_id = 1;

	// The type name for this message.
	string event_type = 2;

	// This is the time the client library created the message for sending.
	// While the Timestamp object supports up to nanosecond precision, we 
	// only expect out of our producers at least millisecond precision, though 
	// more can be given if available.
	google.protobuf.Timestamp created_at = 3;

	// Used to denote special messages
	MessageType type = 4;

	// The environment from which the event was published. Note that this refers
	// to the EventBus environment (production, staging, development) and not 
	// necessarily the environment of the publishing service, though they are 
	// typically the same.
	string environment = 5;
}

enum MessageType {
	DEFAULT = 0;
	NOOP = 1;
}
