77
88[ ![ NPM version] [ npm-image ]] [ npm-url ] [ ![ Downloads] [ downloads-image ]] [ npm-url ] [ ![ Dependency Status] [ david-badge ]] [ david-badge-url ]
99<a href =" #badge " >
10- <img alt =" code style: prettier " src =" https://img.shields.io/badge/code_style-prettier-ff69b4.svg " >
10+ <img alt =" code style: prettier " src =" https://img.shields.io/badge/code_style-prettier-ff69b4.svg " >
1111</a >
1212
1313# Executor for [ Runnerty] : AMQP
14+
1415Module AMQP (Advanced Message Queuing Protocol) 0-9-1 Publisher.
1516This is a wrapper from the [ amqplib] ( https://github.com/squaremo/amqp.node )
1617
1718### Installation:
19+
1820``` bash
1921npm i @runnerty/executor-amqp
2022```
2123
2224### Configuration:
25+
2326Add in [ config.json] :
27+
2428##### Simple:
29+
2530``` json
2631{
2732 "id" : " amqp_default" ,
@@ -31,6 +36,7 @@ Add in [config.json]:
3136```
3237
3338##### All parameters:
39+
3440``` json
3541{
3642 "id" : " amqp_default" ,
@@ -44,7 +50,7 @@ Add in [config.json]:
4450 "frameMax" : 1000 ,
4551 "heartbeat" : 0 ,
4652 "vhost" : " /" ,
47- "options" :{
53+ "options" : {
4854 "expiration" : 10000 ,
4955 "userId" : " myUserId" ,
5056 "CC" : " myCC" ,
@@ -54,7 +60,7 @@ Add in [config.json]:
5460 "deliveryMode" : true ,
5561 "contentType" : " myContentType" ,
5662 "contentEncoding" : " myContentEncoding" ,
57- "headers" : { "header" :" value" },
63+ "headers" : { "header" : " value" },
5864 "priority" : 9 ,
5965 "correlationId" : " myCorrelationId" ,
6066 "replyTo" : " myReplyTo" ,
@@ -67,73 +73,83 @@ Add in [config.json]:
6773```
6874
6975### Plan sample:
76+
7077Add in [ plan.json] :
78+
7179##### Exange:
80+
7281``` json
7382{
7483 "id" : " amqp_default" ,
7584 "exange" : " MY_EXANGE" ,
7685 "exangeType" : " direct" ,
7786 "routingKey" : " runnerty.test.#" ,
7887 "message" : " My message from Runnerty!" ,
79- "options" :{
88+ "options" : {
8089 "persistent" : true
8190 }
8291}
8392```
93+
8494##### Or direct to Queue:
95+
8596``` json
8697{
8798 "id" : " amqp_default" ,
8899 "queue" : " MY_QUEUE" ,
89100 "message" : " My message from Runnerty!" ,
90- "options" :{
101+ "options" : {
91102 "priority" : 10
92103 }
93104}
94105```
106+
95107### Connection parameters
96- | Option | Type | Description |
97- | :-------------- | :------------- | :----------------------------------------------------------------------- |
98- | protocol | string | The to be used protocol: "amqp" or "amqps". Default value: 'amqp'. |
99- | hostname | string | Hostname. Default value: 'localhost' |
100- | port | string | Port. Default value: 5672 |
101- | username | string | Username. Default value: 'guest' |
102- | password | string | Password. Default value: 'guest' |
103- | locale | string | Password. Default value: 'en_US' |
104- | frameMax | number | The size in bytes of the maximum frame allowed. Default value: 0x1000 |
105- | heartbeat | number | The period of the connection heartbeat in seconds. Default value: 0 |
106- | vhost | string | What VHost shall be used. Default value: '/' |
108+
109+ | Option | Type | Description |
110+ | :-------- | :----- | :-------------------------------------------------------------------- |
111+ | protocol | string | The to be used protocol: "amqp" or "amqps". Default value: 'amqp'. |
112+ | hostname | string | Hostname. Default value: 'localhost' |
113+ | port | string | Port. Default value: 5672 |
114+ | username | string | Username. Default value: 'guest' |
115+ | password | string | Password. Default value: 'guest' |
116+ | locale | string | Password. Default value: 'en_US' |
117+ | frameMax | number | The size in bytes of the maximum frame allowed. Default value: 0x1000 |
118+ | heartbeat | number | The period of the connection heartbeat in seconds. Default value: 0 |
119+ | vhost | string | What VHost shall be used. Default value: '/' |
107120
108121### Message options
122+
109123##### Can be set in ` config ` as default or in the process. The value indicated in the process overwrites the one indicated in ` config ` .
110- | Option | Type |
111- | :-------------- | :------------------- |
112- | expiration | string/number |
113- | userId | string |
114- | CC | string/string[ ] |
115- | BCC | string/string[ ] |
116- | mandatory | boolean |
117- | persistent | boolean |
118- | deliveryMode | boolean/number |
119- | contentType | string |
120- | contentEncoding | string |
121- | headers | object (key: value ) |
122- | priority | number |
123- | correlationId | string |
124- | replyTo | string |
125- | messageId | string |
126- | timestamp | number |
127- | type | string |
128- | appId | string |
124+
125+ | Option | Type |
126+ | :-------------- | :----------------- |
127+ | expiration | string/number |
128+ | userId | string |
129+ | CC | string/string[ ] |
130+ | BCC | string/string[ ] |
131+ | mandatory | boolean |
132+ | persistent | boolean |
133+ | deliveryMode | boolean/number |
134+ | contentType | string |
135+ | contentEncoding | string |
136+ | headers | object (key: value ) |
137+ | priority | number |
138+ | correlationId | string |
139+ | replyTo | string |
140+ | messageId | string |
141+ | timestamp | number |
142+ | type | string |
143+ | appId | string |
129144
130145More information in amqp-lib [ api reference] ( http://squaremo.github.com/amqp.node/channel_api.html )
131146
132147### Output (Process values):
133- * ` PROCESS_EXEC_MSG_OUTPUT ` : Log operations message.
134- * ` PROCESS_EXEC_ERR_OUTPUT ` : Error output message.
135148
136- [ Runnerty ] : http://www.runnerty.io
149+ - ` PROCESS_EXEC_MSG_OUTPUT ` : Log operations message.
150+ - ` PROCESS_EXEC_ERR_OUTPUT ` : Error output message.
151+
152+ [ runnerty ] : http://www.runnerty.io
137153[ downloads-image ] : https://img.shields.io/npm/dm/@runnerty/executor-amqp.svg
138154[ npm-url ] : https://www.npmjs.com/package/@runnerty/executor-amqp
139155[ npm-image ] : https://img.shields.io/npm/v/@runnerty/executor-amqp.svg
0 commit comments