diff options
| author | jason | 2015-11-23 20:26:36 -0700 |
|---|---|---|
| committer | jason | 2015-11-23 20:26:36 -0700 |
| commit | 5de2b6bc337ac69204f0e709beafb28108e6ca20 (patch) | |
| tree | 91db39c12f97e12440b52d223f579872e10b8c13 /docs | |
| parent | 61869e4ae2e23a94c9cc92bb625069c50858db80 (diff) | |
| download | eventmq-5de2b6bc337ac69204f0e709beafb28108e6ca20.tar.gz eventmq-5de2b6bc337ac69204f0e709beafb28108e6ca20.zip | |
Many changes
- organizes some code
- Router sends acknowledgement after jobmanager INFORMs
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/api.rst | 3 | ||||
| -rw-r--r-- | docs/contributing.rst | 6 | ||||
| -rw-r--r-- | docs/exceptions.rst | 2 | ||||
| -rw-r--r-- | docs/poller.rst | 3 | ||||
| -rw-r--r-- | docs/protocol.rst | 43 | ||||
| -rw-r--r-- | docs/utils/classes.rst | 3 | ||||
| -rw-r--r-- | docs/utils/messages.rst | 3 |
7 files changed, 61 insertions, 2 deletions
diff --git a/docs/api.rst b/docs/api.rst index b0ecf4e..b3cdc83 100644 --- a/docs/api.rst +++ b/docs/api.rst | |||
| @@ -5,9 +5,10 @@ API Documentation | |||
| 5 | .. toctree:: | 5 | .. toctree:: |
| 6 | :maxdepth: 2 | 6 | :maxdepth: 2 |
| 7 | 7 | ||
| 8 | exceptions | ||
| 8 | jobmanager | 9 | jobmanager |
| 10 | poller | ||
| 9 | receiver | 11 | receiver |
| 10 | router | 12 | router |
| 11 | sender | 13 | sender |
| 12 | utils | 14 | utils |
| 13 | exceptions | ||
diff --git a/docs/contributing.rst b/docs/contributing.rst index c0a03fb..2489abb 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst | |||
| @@ -2,7 +2,13 @@ | |||
| 2 | Contributing to EventMQ | 2 | Contributing to EventMQ |
| 3 | ####################### | 3 | ####################### |
| 4 | 4 | ||
| 5 | A few tips when working on the code | ||
| 6 | |||
| 7 | * Use relative imports. If you use absolute imports then when you `import eventmq.exceptions` it's possible that you receive in return a different version of eventmq. exceptions installed somewhere else on the system. | ||
| 8 | |||
| 5 | .. toctree:: | 9 | .. toctree:: |
| 6 | :maxdepth: 1 | 10 | :maxdepth: 1 |
| 7 | 11 | ||
| 8 | protocol | 12 | protocol |
| 13 | Source Code <https://github.com/enderlabs/eventmq> | ||
| 14 | Issues <https://github.com/enderlabs/eventmq/issues> | ||
diff --git a/docs/exceptions.rst b/docs/exceptions.rst new file mode 100644 index 0000000..04f9c5a --- /dev/null +++ b/docs/exceptions.rst | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | .. automodule:: eventmq.exceptions | ||
| 2 | :members: | ||
diff --git a/docs/poller.rst b/docs/poller.rst new file mode 100644 index 0000000..1aab472 --- /dev/null +++ b/docs/poller.rst | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | .. automodule:: eventmq.poller | ||
| 2 | :members: | ||
| 3 | :special-members: | ||
diff --git a/docs/protocol.rst b/docs/protocol.rst index d9bd9e1..c32501c 100644 --- a/docs/protocol.rst +++ b/docs/protocol.rst | |||
| @@ -46,9 +46,22 @@ From the 0MQ manual[[2](http://api.zeromq.org/master:zmq-socket)] | |||
| 46 | 46 | ||
| 47 | This extra frame is not shown in the specifications below. | 47 | This extra frame is not shown in the specifications below. |
| 48 | 48 | ||
| 49 | Global Frames | ||
| 50 | ------------- | ||
| 51 | An **ACK** command consists of a 4-frame multipart message, formatted as follows. | ||
| 52 | |||
| 53 | ====== ============== =========== | ||
| 54 | FRAME Value Description | ||
| 55 | ====== ============== =========== | ||
| 56 | 0 _EMPTY_ leave empty | ||
| 57 | 1 eMQP/1.0 Protocol version | ||
| 58 | 2 ACK command | ||
| 59 | 3 _MSGID_ A unique id for the msg | ||
| 60 | ====== ============== =========== | ||
| 61 | |||
| 49 | eMQP / Client | 62 | eMQP / Client |
| 50 | ------------- | 63 | ------------- |
| 51 | A **REQUEST** command consists of 7-frame multipart message, formatted as follows. | 64 | A **REQUEST** command consists of a 7-frame multipart message, formatted as follows. |
| 52 | 65 | ||
| 53 | ====== ============== =========== | 66 | ====== ============== =========== |
| 54 | FRAME Value Description | 67 | FRAME Value Description |
| @@ -62,6 +75,20 @@ FRAME Value Description | |||
| 62 | 6 _MSG_ The message to send | 75 | 6 _MSG_ The message to send |
| 63 | ====== ============== =========== | 76 | ====== ============== =========== |
| 64 | 77 | ||
| 78 | A **PUBLISH** command consists of a 7-frame multipart messag, formatted as follows. | ||
| 79 | |||
| 80 | ====== ============== =========== | ||
| 81 | FRAME Value Description | ||
| 82 | ====== ============== =========== | ||
| 83 | 0 _EMPTY_ leave empty | ||
| 84 | 1 eMQP/1.0 Protocol version | ||
| 85 | 2 PUBLISH command | ||
| 86 | 3 _MSGID_ A unique id for the msg | ||
| 87 | 4 _TOPIC_NAME_ the name of the queue the worker belongs to | ||
| 88 | 5 _HEADERS_ dictionary of headers. can be an empty set | ||
| 89 | 6 _MSG_ The message to send | ||
| 90 | ====== ============== =========== | ||
| 91 | |||
| 65 | eMQP / Worker | 92 | eMQP / Worker |
| 66 | ------------- | 93 | ------------- |
| 67 | An **INFORM** command consists of a 5-frame multipart message, formatted as follows. | 94 | An **INFORM** command consists of a 5-frame multipart message, formatted as follows. |
| @@ -128,3 +155,17 @@ Heartbeating | |||
| 128 | * Both worker and broker MUST send heartbeats at regular and agreed-upon intervals. | 155 | * Both worker and broker MUST send heartbeats at regular and agreed-upon intervals. |
| 129 | * If the worker detects that the broker disconnected it SHOULD restart the conversation. | 156 | * If the worker detects that the broker disconnected it SHOULD restart the conversation. |
| 130 | * If the broker detects that a worker has disconnected it should stop sending it a message of any type. | 157 | * If the broker detects that a worker has disconnected it should stop sending it a message of any type. |
| 158 | |||
| 159 | Request Headers | ||
| 160 | --------------- | ||
| 161 | 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. | ||
| 162 | |||
| 163 | Below is a table which defines and describes the headers. | ||
| 164 | |||
| 165 | =============== ======= ======= ======= =========== | ||
| 166 | Header REQUEST PUBLISH Default Description | ||
| 167 | =============== ======= ======= ======= =========== | ||
| 168 | reply-requested X False Once the job is finished, send a reply back with information from the job. If there is no information reply with a True value. | ||
| 169 | retry-count:# X 0 Retry a failed job this many times before accepting defeat. | ||
| 170 | guarantee X False Ensure the job completes by letting someone else worry about a success reply. | ||
| 171 | =============== ======= ======= ======= =========== | ||
diff --git a/docs/utils/classes.rst b/docs/utils/classes.rst new file mode 100644 index 0000000..ab48e06 --- /dev/null +++ b/docs/utils/classes.rst | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | .. automodule:: eventmq.utils.classes | ||
| 2 | :members: | ||
| 3 | :special-members: | ||
diff --git a/docs/utils/messages.rst b/docs/utils/messages.rst new file mode 100644 index 0000000..e49897c --- /dev/null +++ b/docs/utils/messages.rst | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | .. automodule:: eventmq.utils.messages | ||
| 2 | :members: | ||
| 3 | :special-members: | ||