sb-rabbitmq-provider 1.0.25 → 1.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -6
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -24,7 +24,6 @@ declare class RabbitMqConnection {
|
|
24
24
|
exchangeType: string;
|
25
25
|
dropMessageOnChannelFailure: boolean;
|
26
26
|
connection: any;
|
27
|
-
channel: any;
|
28
27
|
/**
|
29
28
|
* constructor for initialising url, exchange name, exchange type
|
30
29
|
* @param url rabbitmq url
|
@@ -41,7 +40,6 @@ declare class RabbitMqConnection {
|
|
41
40
|
/**
|
42
41
|
* single connection can have multiple channel like publishChannel and consumeChannel
|
43
42
|
* @returns channel object
|
44
|
-
* No need to use this method, as channel is created in createConnection method.
|
45
43
|
*/
|
46
44
|
createChannel(): Promise<RabbitMQChannel>;
|
47
45
|
/**
|
package/dist/index.js
CHANGED
@@ -48,11 +48,6 @@ class RabbitMqConnection {
|
|
48
48
|
return __awaiter(this, void 0, void 0, function* () {
|
49
49
|
try {
|
50
50
|
const connection = yield amqplib_1.default.connect(this.config);
|
51
|
-
if (this.exchange && this.exchangeType) {
|
52
|
-
const channel = yield this.connection.createChannel();
|
53
|
-
yield channel.assertExchange(this.exchange, this.exchangeType);
|
54
|
-
this.channel = channel;
|
55
|
-
}
|
56
51
|
// console.log('---RabbitMQ Connection Created---')
|
57
52
|
this.connection = connection;
|
58
53
|
return connection;
|
@@ -65,7 +60,6 @@ class RabbitMqConnection {
|
|
65
60
|
/**
|
66
61
|
* single connection can have multiple channel like publishChannel and consumeChannel
|
67
62
|
* @returns channel object
|
68
|
-
* No need to use this method, as channel is created in createConnection method.
|
69
63
|
*/
|
70
64
|
createChannel() {
|
71
65
|
return __awaiter(this, void 0, void 0, function* () {
|