diff options
Diffstat (limited to '_sources/protocol.txt')
| -rw-r--r-- | _sources/protocol.txt | 57 |
1 files changed, 52 insertions, 5 deletions
diff --git a/_sources/protocol.txt b/_sources/protocol.txt index e468b06..ddbcfcc 100644 --- a/_sources/protocol.txt +++ b/_sources/protocol.txt | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ****************************** | 1 | /****************************e |
| 2 | EventMQ Protocol Specification | 2 | EventMQ Protocol Specification |
| 3 | ****************************** | 3 | ****************************** |
| 4 | *The status of this document is alpha and subject to heavy change* | 4 | *The status of this document is alpha and subject to heavy change* |
| @@ -86,10 +86,53 @@ FRAME Value Description | |||
| 86 | 2 PUBLISH command | 86 | 2 PUBLISH command |
| 87 | 3 _MSGID_ A unique id for the msg | 87 | 3 _MSGID_ A unique id for the msg |
| 88 | 4 _TOPIC_NAME_ the name of the queue the worker belongs to | 88 | 4 _TOPIC_NAME_ the name of the queue the worker belongs to |
| 89 | 5 _HEADERS_ dictionary of headers. can be an empty set | 89 | 5 _HEADERS_ csv list of headers |
| 90 | 6 _MSG_ The message to send | 90 | 6 _MSG_ The message to send |
| 91 | ====== ============== =========== | 91 | ====== ============== =========== |
| 92 | 92 | ||
| 93 | A **SCHEDULE** command consists of a 7-frame multipart message, formatted as follows. | ||
| 94 | |||
| 95 | ====== ============== =========== | ||
| 96 | FRAME Value Description | ||
| 97 | ====== ============== =========== | ||
| 98 | 0 _EMPTY_ leave empty | ||
| 99 | 1 eMQP/1.0 Protocol version | ||
| 100 | 2 SCHEDULE command | ||
| 101 | 3 _MSGID_ A unique id for the msg | ||
| 102 | 4 _TOPIC_NAME_ name of queue that the job should run in | ||
| 103 | 5 _HEADERS_ csv list of headers for this message | ||
| 104 | 6 _MSG_ The message to send | ||
| 105 | ====== ============== =========== | ||
| 106 | |||
| 107 | An **UNSCHEDULE** command consists of a 7-frame multipart message, formatted as follows. | ||
| 108 | |||
| 109 | ====== ============== =========== | ||
| 110 | FRAME Value Description | ||
| 111 | ====== ============== =========== | ||
| 112 | 0 _EMPTY_ leave empty | ||
| 113 | 1 eMQP/1.0 Protocol version | ||
| 114 | 2 UNSCHEDULE command | ||
| 115 | 3 _MSGID_ A unique id for the msg | ||
| 116 | 4 _TOPIC_NAME_ ignored for this command, broadcasted to all queues | ||
| 117 | 5 _HEADERS_ csv list of headers for this message | ||
| 118 | 6 _MSG_ The message to send | ||
| 119 | ====== ============== =========== | ||
| 120 | |||
| 121 | eMQP / Scheduler | ||
| 122 | ---------------- | ||
| 123 | An **INFORM** command consists of a 6-frame multipart message, formatted as follows. | ||
| 124 | |||
| 125 | ====== ============== =========== | ||
| 126 | FRAME Value Description | ||
| 127 | ====== ============== =========== | ||
| 128 | 0 _EMPTY_ leave empty | ||
| 129 | 1 eMQP/1.0 Protocol version | ||
| 130 | 2 INFORM command | ||
| 131 | 3 _MSGID_ A unique id for the msg | ||
| 132 | 4 _QUEUE_NAME_ csv seperated names of queue the worker belongs to | ||
| 133 | 5 scheduler type of peer connecting | ||
| 134 | ====== ============== =========== | ||
| 135 | |||
| 93 | eMQP / Worker | 136 | eMQP / Worker |
| 94 | ------------- | 137 | ------------- |
| 95 | An **INFORM** command consists of a 5-frame multipart message, formatted as follows. | 138 | An **INFORM** command consists of a 5-frame multipart message, formatted as follows. |
| @@ -102,6 +145,7 @@ FRAME Value Description | |||
| 102 | 2 INFORM command | 145 | 2 INFORM command |
| 103 | 3 _MSGID_ A unique id for the msg | 146 | 3 _MSGID_ A unique id for the msg |
| 104 | 4 _QUEUE_NAME_ csv seperated names of queue the worker belongs to | 147 | 4 _QUEUE_NAME_ csv seperated names of queue the worker belongs to |
| 148 | 5 worker type of peer connecting | ||
| 105 | ====== ============== =========== | 149 | ====== ============== =========== |
| 106 | 150 | ||
| 107 | A **READY** frame consists of a 4-frame multipart message, formatted as follows. | 151 | A **READY** frame consists of a 4-frame multipart message, formatted as follows. |
| @@ -154,13 +198,16 @@ Heartbeating | |||
| 154 | ------------ | 198 | ------------ |
| 155 | * HEARTBEAT commands are valid at any time after an INFORM command | 199 | * HEARTBEAT commands are valid at any time after an INFORM command |
| 156 | * Any command except DISCONNECT act as a heartbeat. Peers SHOULD NOT send HEARTBEAT commands while sending other commands. | 200 | * Any command except DISCONNECT act as a heartbeat. Peers SHOULD NOT send HEARTBEAT commands while sending other commands. |
| 157 | * Both worker and broker MUST send heartbeats at regular and agreed-upon intervals. | 201 | * Worker and broker MUST send heartbeats at regular and agreed-upon intervals. |
| 202 | * Scheduler and broker MUST send heartbeats at regular and agreed-upon intervals. | ||
| 158 | * If the worker detects that the broker disconnected it SHOULD restart the conversation. | 203 | * If the worker detects that the broker disconnected it SHOULD restart the conversation. |
| 159 | * If the broker detects that a worker has disconnected it should stop sending it a message of any type. | 204 | * If the broker detects that a worker has disconnected it should stop sending it a message of any type. |
| 205 | * If the scheduler detects that the broker disconnects it SHOULD restart the conversation. | ||
| 206 | * If the broker detects that a scheduler has disconnected it should ??????????. | ||
| 160 | 207 | ||
| 161 | Request Headers | 208 | REQUEST Headers |
| 162 | --------------- | 209 | --------------- |
| 163 | Headers MUST be 0 to many comma seperated values inserted into the header field. If there are no headers requried, send an empty string MUST be sent where headers are required. | 210 | Headers MUST be 0 to many comma seperated values inserted into the header field. If there are no headers required, send an empty string MUST be sent where headers are required. |
| 164 | 211 | ||
| 165 | Below is a table which defines and describes the headers. | 212 | Below is a table which defines and describes the headers. |
| 166 | 213 | ||