@jsnw/nestjs-rabbitmq 2.0.3 → 2.0.4
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.
|
@@ -175,9 +175,16 @@ class Rabbitmq {
|
|
|
175
175
|
exchange: options.exchange.name,
|
|
176
176
|
routingKey: options.routingKey,
|
|
177
177
|
durable: options.durable !== undefined ? options.durable : options.exchange.durable,
|
|
178
|
-
|
|
178
|
+
/*
|
|
179
|
+
As it turned out, rabbitmq-client's Envelope['contentType'] is not used anywhere,
|
|
180
|
+
the library sets contentType property based on the type of message body and completely
|
|
181
|
+
disregards contentType set in the Envelope
|
|
182
|
+
|
|
183
|
+
https://github.com/cody-greene/node-rabbitmq-client/blob/af2317717e2ef169717f2371ddf2c8bf2843ed37/src/Channel.ts#L501
|
|
184
|
+
*/
|
|
185
|
+
// contentType: options.type === 'json' ? 'application/json' : undefined,
|
|
179
186
|
expiration: options.ttlMs?.toString() ?? undefined
|
|
180
|
-
}, options.
|
|
187
|
+
}, options.message);
|
|
181
188
|
}
|
|
182
189
|
/**
|
|
183
190
|
* @return {Promise<void>}
|