Skip to content

Commit

Permalink
update protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
icebob committed Sep 11, 2017
1 parent 3861ae4 commit f5a7e45
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions docs/PROTOCOL.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ This documentation describes the communication protocol between Moleculer nodes.
**Variables in topic names:**
- `<namespace>` - Namespace from broker options
- `<nodeID>` - Target nodeID
- `<action>` - Action name. E.g.: `posts.find`
- `<group>` - Event group name. E.g.: `users`
- `<event>` - Event name. E.g.: `user.created`


## Subscriptions
Expand Down Expand Up @@ -111,8 +114,9 @@ When a node is stopping, it broadcasts a `DISCONNECT` packet to all nodes.
### `REQUEST`

**Topic name:**
- `MOL.REQUEST.node-2`
- `MOL-dev.REQUEST.node-2` (if namespace is `dev`)
- `MOL.REQ.node-2`
- `MOL.REQB.<action>` (if built-in balancer is disabled)
- `MOL-dev.REQ.node-2` (if namespace is `dev`)

**Fields:**

Expand All @@ -134,8 +138,8 @@ When a node is stopping, it broadcasts a `DISCONNECT` packet to all nodes.
### `RESPONSE`

**Topic name:**
- `MOL.RESPONSE.node-1`
- `MOL-dev.RESPONSE.node-1` (if namespace is `dev`)
- `MOL.RES.node-1`
- `MOL-dev.RES.node-1` (if namespace is `dev`)

**Fields:**

Expand All @@ -153,6 +157,7 @@ When a node is stopping, it broadcasts a `DISCONNECT` packet to all nodes.

**Topic name:**
- `MOL.EVENT.node-1`
- `MOL.EVENTB.<group>.<event>` (if built-in balancer is disabled)
- `MOL-dev.EVENT.node-1` (if namespace is `dev`)

**Fields:**
Expand Down

0 comments on commit f5a7e45

Please sign in to comment.