diff options
| author | sideshowdave7 | 2016-01-20 13:36:08 -0700 |
|---|---|---|
| committer | sideshowdave7 | 2016-01-20 13:36:08 -0700 |
| commit | b52d4a45ed2bb37d293e7d3e9b85cf325511fe9e (patch) | |
| tree | 2546ee14d8e26c88b08ea08f533c4008e0b721d0 /docs/protocol.rst | |
| parent | 9b1271dbdf05e95ee39e5aa6d349a245fc2cf285 (diff) | |
| parent | 4c216077b12bd56b6d399beccf5a035c5966daa0 (diff) | |
| download | eventmq-0.1.2.tar.gz eventmq-0.1.2.zip | |
Merge pull request #15 from enderlabs/feature/scheduler0.1.2
Feature/scheduler
Diffstat (limited to 'docs/protocol.rst')
| -rw-r--r-- | docs/protocol.rst | 53 |
1 files changed, 50 insertions, 3 deletions
diff --git a/docs/protocol.rst b/docs/protocol.rst index e468b06..f7089ad 100644 --- a/docs/protocol.rst +++ b/docs/protocol.rst | |||
| @@ -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 | ||
| 91 | ====== ============== =========== | ||
| 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 | ||
| 90 | 6 _MSG_ The message to send | 118 | 6 _MSG_ The message to send |
| 91 | ====== ============== =========== | 119 | ====== ============== =========== |
| 92 | 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,11 +198,14 @@ 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 requried, send an empty string MUST be sent where headers are required. |
| 164 | 211 | ||