Skip to content

Commit 7d97bd3

Browse files
Merge pull request #5 from TrueSparrowSystems/branding-changes
branding changes
2 parents d2a30c0 + 7aab94d commit 7d97bd3

18 files changed

Lines changed: 53 additions & 50 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
## Queue v2.0.0
2+
- Republished package under @truesparrow
3+
14
## Queue v1.0.1
25
- LICENSE changes.
36
- README changes.
47

58
## Queue v1.0.0
6-
- PLG Works Queue is implemented to publish critical events using EventEmitter and RabbitMQ.
9+
- True Sparrow Queue is implemented to publish critical events using EventEmitter and RabbitMQ.
710

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
The MIT License (MIT)
2-
Copyright © 2022 PLG Works
2+
Copyright © 2022 True Sparrow Systems Pvt. Ltd.
33

44
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
55

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Queue
22

3-
![npm version](https://img.shields.io/npm/v/@plgworks/queue.svg?style=flat)
3+
![npm version](https://img.shields.io/npm/v/@truesparrow/queue.svg?style=flat)
44

5-
PLG Works Queue helps in publishing and subscribing tasks over [RabbitMQ](https://www.rabbitmq.com/). Internally it uses topic-based exchange.
5+
True Sparrow Queue helps in publishing and subscribing tasks over [RabbitMQ](https://www.rabbitmq.com/). Internally it uses topic-based exchange.
66

77
One use-case is to publish tasks for asynchronous processing. For example, **API worker process** can publish tasks which will be taken up by **asynchronous worker processes** which have subscribed for such tasks.
88

@@ -12,11 +12,11 @@ One use-case is to publish tasks for asynchronous processing. For example, **API
1212
## Install
1313

1414
```bash
15-
npm install @plgworks/queue --save
15+
npm install @truesparrow/queue --save
1616
```
1717

1818
## Initialize
19-
`configStrategy` is passed to initialize PLG Works Queue. `configStrategy` is an object with `rabbitmq` as a key. The value of `rabbitmq` is an object with following keys:
19+
`configStrategy` is passed to initialize True Sparrow Queue. `configStrategy` is an object with `rabbitmq` as a key. The value of `rabbitmq` is an object with following keys:
2020
- **username** [string] (mandatory) RabbitMQ connection username
2121
- **password** [string] (mandatory) RabbitMQ connection password
2222
- **host** [string] (mandatory) RabbitMQ host
@@ -27,12 +27,12 @@ npm install @plgworks/queue --save
2727
- **switchHostAfterSec** [integer] (optional) Wait time before switching RMQ host.
2828
- **connectionTimeoutSec** [integer] (optional) Wait time for connection to establish.
2929

30-
Following snippet initializes PLG Works Queue Manager:
30+
Following snippet initializes True Sparrow Queue Manager:
3131

3232
```js
33-
const Queue = require('@plgworks/queue');
33+
const Queue = require('@truesparrow/queue');
3434

35-
// Config Strategy for PLG Works Queue.
35+
// Config Strategy for True Sparrow Queue.
3636
configStrategy = {
3737
'rabbitmq': {
3838
'username': 'guest',
@@ -79,9 +79,9 @@ const queueManager = await Queue.getInstance(configStrategy);
7979
Following snippet subscribes to specific topics over a queue.
8080

8181
```js
82-
const Queue = require('@plgworks/queue');
82+
const Queue = require('@truesparrow/queue');
8383

84-
// Config Strategy for PLG Works Queue.
84+
// Config Strategy for True Sparrow Queue.
8585
configStrategy = {
8686
'rabbitmq': {
8787
'username': 'guest',
@@ -184,7 +184,7 @@ subscribe();
184184
Following snippet publishes a task for specific topics.
185185

186186
```js
187-
// Config Strategy for PLG Works Queue.
187+
// Config Strategy for True Sparrow Queue.
188188
configStrategy = {
189189
'rabbitmq': {
190190
'username': 'guest',
@@ -206,7 +206,7 @@ const message = {
206206
};
207207

208208
// Import the Queue module.
209-
const Queue = require('@plgworks/queue');
209+
const Queue = require('@truesparrow/queue');
210210
const publish = async function() {
211211
const queueManager = await Queue.getInstance(configStrategy);
212212
queueManager.publishEvent.perform(
@@ -229,7 +229,7 @@ Such tasks can be published by using the `publishAfter` parameter. Internally, w
229229
**Important Note**: Do not use arbitrary values of delays. Internally, the message is stored in a delay specific queue for the waiting duration. As the number of allowed delays increases, so do the number of waiting queues. Having too many queues, can hamper RabbitMQ performance.
230230

231231
```js
232-
// Config Strategy for PLG Works Queue.
232+
// Config Strategy for True Sparrow Queue.
233233
configStrategy = {
234234
'rabbitmq': {
235235
'username': 'guest',
@@ -251,7 +251,7 @@ const message = {
251251
};
252252

253253
// Import the Queue module.
254-
const Queue = require('@plgworks/queue');
254+
const Queue = require('@truesparrow/queue');
255255
const publish = async function() {
256256
const queueManager = await Queue.getInstance(configStrategy);
257257
queueManager.publishEvent.perform(

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.1
1+
2.0.0

config/coreConstant.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class CoreConstants {
1919
* @returns {string}
2020
*/
2121
get icNameSpace() {
22-
return 'PLGWorksQueue';
22+
return 'Queue';
2323
}
2424

2525
/**

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
const PLGWorksBase = require('@plgworks/base');
1+
const Base = require('@truesparrow/base');
22

33
const rootPrefix = '.',
44
version = require(rootPrefix + '/package.json').version,
55
rabbitmqHelper = require(rootPrefix + '/lib/rabbitmq/helper'),
66
coreConstant = require(rootPrefix + '/config/coreConstant');
77

8-
const InstanceComposer = PLGWorksBase.InstanceComposer;
8+
const InstanceComposer = Base.InstanceComposer;
99

1010
require(rootPrefix + '/lib/rabbitmq/helper');
1111
require(rootPrefix + '/lib/rabbitmq/connection');

lib/formatter/response.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* @module lib/formatter/response
55
*/
66

7-
const PLGWorksBase = require('@plgworks/base'),
8-
responseHelper = new PLGWorksBase.responseHelper({ moduleName: 'PLGWorksQueue' });
7+
const Base = require('@truesparrow/base'),
8+
responseHelper = new Base.responseHelper({ moduleName: 'Queue' });
99

1010
module.exports = responseHelper;

lib/logger/customConsoleLogger.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
*
44
* @module lib/logger/customConsoleLogger
55
*/
6-
const PLGWorksBase = require('@plgworks/base');
6+
const Base = require('@truesparrow/base');
77

88
const rootPrefix = '../..',
99
coreConstants = require(rootPrefix + '/config/coreConstant');
1010

11-
const Logger = PLGWorksBase.Logger;
11+
const Logger = Base.Logger;
1212

1313
// Following is to ensure that INFO logs are printed when debug is off.
1414
let loggerLevel;
@@ -18,4 +18,4 @@ if (1 === Number(coreConstants.DEBUG_ENABLED)) {
1818
loggerLevel = Logger.LOG_LEVELS.INFO;
1919
}
2020

21-
module.exports = new Logger('plgworks-queue', loggerLevel);
21+
module.exports = new Logger('truesparrow-queue', loggerLevel);

lib/rabbitmq/connection.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* @module lib/rabbitmq/connection
55
*/
66

7-
const PLGWorksBase = require('@plgworks/base');
7+
const Base = require('@truesparrow/base');
88

99
const rootPrefix = '../..',
1010
amqp = require('amqplib/callback_api'),
@@ -13,7 +13,7 @@ const rootPrefix = '../..',
1313
logger = require(rootPrefix + '/lib/logger/customConsoleLogger'),
1414
coreConstant = require(rootPrefix + '/config/coreConstant');
1515

16-
const InstanceComposer = PLGWorksBase.InstanceComposer;
16+
const InstanceComposer = Base.InstanceComposer;
1717

1818
const rmqIdToConnectionMap = {},
1919
rmqIdToInProcessRequestsMap = {};

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "@plgworks/queue",
3-
"version": "1.0.1",
2+
"name": "@truesparrow/queue",
3+
"version": "2.0.0",
44
"description": "Queue helps publish critical events using EventEmitter and RabbitMQ.",
55
"main": "index.js",
66
"scripts": {
@@ -9,22 +9,22 @@
99
},
1010
"repository": {
1111
"type": "git",
12-
"url": "https://github.com/PLG-Works/queue.git"
12+
"url": "https://github.com/TrueSparrowSystems/queue.git"
1313
},
1414
"keywords": [
15-
"PLG Works Queue",
15+
"True Sparrow Queue",
1616
"Event Emitter",
1717
"RabbitMQ",
1818
"PubSub"
1919
],
20-
"author": "PLG Works",
20+
"author": "True Sparrow",
2121
"license": "MIT",
2222
"bugs": {
23-
"url": "https://github.com/PLG-Works/queue/issues"
23+
"url": "https://github.com/TrueSparrowSystems/queue/issues"
2424
},
25-
"homepage": "https://github.com/PLG-Works/queue#readme",
25+
"homepage": "https://github.com/TrueSparrowSystems/queue#readme",
2626
"dependencies": {
27-
"@plgworks/base": "1.0.0",
27+
"@truesparrow/base": "2.0.0",
2828
"amqplib": "0.8.0",
2929
"uuid": "8.3.2"
3030
},

0 commit comments

Comments
 (0)