aboutsummaryrefslogtreecommitdiff
path: root/kamon-core/src/main/protobuf/WireFormats.proto
blob: 98a954cc893a1c6961140b6966f6ac2cc2c8eec8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
/**
 * Copyright (C) 2009-2014 Typesafe Inc. <http://www.typesafe.com>
 */

// Extracted from https://github.com/akka/akka/blob/master/akka-remote/src/main/protobuf/WireFormats.proto


option java_package = "akka.remote";
option optimize_for = SPEED;

/******************************************
 * Remoting message formats
 ******************************************/


message AckAndEnvelopeContainer {
    optional AcknowledgementInfo ack = 1;
    optional RemoteEnvelope envelope = 2;
}

/**
 * Defines a remote message.
 */
message RemoteEnvelope {
    required ActorRefData recipient = 1;
    required SerializedMessage message = 2;
    optional ActorRefData sender = 4;
    optional fixed64 seq = 5;
}

message AcknowledgementInfo {
    required fixed64 cumulativeAck = 1;
    repeated fixed64 nacks = 2;
}

/**
 * Defines a remote ActorRef that "remembers" and uses its original Actor instance
 * on the original node.
 */
message ActorRefData {
    required string path = 1;
}

/**
 * Defines a message.
 */
message SerializedMessage {
    required bytes message = 1;
    required int32 serializerId = 2;
    optional bytes messageManifest = 3;
}

/**
 * Defines akka.remote.DaemonMsgCreate
 */
message DaemonMsgCreateData {
    required PropsData props = 1;
    required DeployData deploy = 2;
    required string path = 3;
    required ActorRefData supervisor = 4;
}

/**
 * Serialization of akka.actor.Props
 */
message PropsData {
    required DeployData deploy = 2;
    required string clazz = 3;
    repeated bytes args = 4;
    repeated string classes = 5;
}

/**
 * Serialization of akka.actor.Deploy
 */
message DeployData {
    required string path = 1;
    optional bytes config = 2;
    optional bytes routerConfig = 3;
    optional bytes scope = 4;
    optional string dispatcher = 5;
}


/******************************************
 * Akka Protocol message formats
 ******************************************/

/**
 * Message format of Akka Protocol.
 * Message contains either a payload or an instruction.
 */
message AkkaProtocolMessage {
    optional bytes payload = 1;
    optional AkkaControlMessage instruction = 2;
}

/**
 * Defines some control messages for the remoting
 */
message AkkaControlMessage {
    required CommandType commandType = 1;
    optional AkkaHandshakeInfo handshakeInfo = 2;
}

message AkkaHandshakeInfo {
    required AddressData origin = 1;
    required fixed64 uid = 2;
    optional string cookie = 3;

}

/**
 * Defines the type of the AkkaControlMessage command type
 */
enum CommandType {
    ASSOCIATE = 1;
    DISASSOCIATE = 2;
    HEARTBEAT = 3;
    DISASSOCIATE_SHUTTING_DOWN = 4; // Remote system is going down and will not accepts new connections
    DISASSOCIATE_QUARANTINED = 5;   // Remote system refused the association since the current system is quarantined
}

/**
 * Defines a remote address.
 */
message AddressData {
    required string system = 1;
    required string hostname = 2;
    required uint32 port = 3;
    optional string protocol = 4;
}