Skip to content

Commit b040363

Browse files
committed
Now properly accessing properties of the message
1 parent 84b9108 commit b040363

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/triggers/consume.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ function processAction(msg, cfg) {
2020
const queueName = `eio_consumer_${process.env.ELASTICIO_TASK_ID}_${process.env.ELASTICIO_USER_ID}`;
2121
const keys = (cfg.bindingKeys || '#').split(',').map((s) => s.trim());
2222
const consumer = (msg) => {
23-
console.log('Have got message id=%s fields=%j', msg.id, msg.fields);
23+
console.log('Have got message fields=%j properties=%j', msg.fields, msg.properties);
2424
const decrypted = encryptor.decryptMessageContent(msg.content);
2525
debug('Decrypted message=%j', decrypted);
2626
const newMsg = eioUtils.newMessageWithBody(decrypted.body || {});
27-
newMsg.id = msg.id;
27+
newMsg.id = msg.properties.messageId;
2828
newMsg.attachments = decrypted.attachments || {};
2929
this.emit('data', newMsg);
3030
};

0 commit comments

Comments
 (0)