Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
props.deadLetterSource = msg.message_annotations[Constants.deadLetterSource];
}
if (msg.message_annotations[Constants.enqueueSequenceNumber] != null) {
props.enqueuedSequenceNumber = msg.message_annotations[Constants.enqueueSequenceNumber];
}
if (msg.message_annotations[Constants.sequenceNumber] != null) {
if (Buffer.isBuffer(msg.message_annotations[Constants.sequenceNumber])) {
props.sequenceNumber = Long.fromBytesBE(msg.message_annotations[Constants.sequenceNumber]);
} else {
props.sequenceNumber = Long.fromNumber(msg.message_annotations[Constants.sequenceNumber]);
}
}
if (msg.message_annotations[Constants.enqueuedTime] != null) {
props.enqueuedTimeUtc = new Date(msg.message_annotations[Constants.enqueuedTime] as number);
}
if (msg.message_annotations[Constants.lockedUntil] != null) {
props.lockedUntilUtc = new Date(msg.message_annotations[Constants.lockedUntil] as number);
}
}
if (msg.ttl != null && msg.ttl >= Constants.maxDurationValue - props.enqueuedTimeUtc.getTime()) {
props.expiresAtUtc = new Date(Constants.maxDurationValue);
} else {
props.expiresAtUtc = new Date(props.enqueuedTimeUtc.getTime() + msg.ttl!);
}
const rcvdsbmsg: ReceivedMessageInfo = {
_amqpMessage: msg,
_delivery: delivery,
deliveryCount: msg.delivery_count,
lockToken:
delivery && delivery.tag && delivery.tag.length !== 0
? uuid_to_string(}
if (msg.message_annotations[Constants.enqueueSequenceNumber] != null) {
props.enqueuedSequenceNumber = msg.message_annotations[Constants.enqueueSequenceNumber];
}
if (msg.message_annotations[Constants.sequenceNumber] != null) {
if (Buffer.isBuffer(msg.message_annotations[Constants.sequenceNumber])) {
props.sequenceNumber = Long.fromBytesBE(msg.message_annotations[Constants.sequenceNumber]);
} else {
props.sequenceNumber = Long.fromNumber(msg.message_annotations[Constants.sequenceNumber]);
}
}
if (msg.message_annotations[Constants.enqueuedTime] != null) {
props.enqueuedTimeUtc = new Date(msg.message_annotations[Constants.enqueuedTime] as number);
}
if (msg.message_annotations[Constants.lockedUntil] != null) {
props.lockedUntilUtc = new Date(msg.message_annotations[Constants.lockedUntil] as number);
}
}
if (msg.ttl != null && msg.ttl >= Constants.maxDurationValue - props.enqueuedTimeUtc.getTime()) {
props.expiresAtUtc = new Date(Constants.maxDurationValue);
} else {
props.expiresAtUtc = new Date(props.enqueuedTimeUtc.getTime() + msg.ttl!);
}
const rcvdsbmsg: ReceivedMessageInfo = {
_amqpMessage: msg,
_delivery: delivery,
deliveryCount: msg.delivery_count,
lockToken:
delivery && delivery.tag && delivery.tag.length !== 0
? uuid_to_string(
shouldReorderLockToken === true}
if (msg.message_annotations[Constants.enqueueSequenceNumber] != null) {
props.enqueuedSequenceNumber = msg.message_annotations[Constants.enqueueSequenceNumber];
}
if (msg.message_annotations[Constants.sequenceNumber] != null) {
if (Buffer.isBuffer(msg.message_annotations[Constants.sequenceNumber])) {
props.sequenceNumber = Long.fromBytesBE(msg.message_annotations[Constants.sequenceNumber]);
} else {
props.sequenceNumber = Long.fromNumber(msg.message_annotations[Constants.sequenceNumber]);
}
}
if (msg.message_annotations[Constants.enqueuedTime] != null) {
props.enqueuedTimeUtc = new Date(msg.message_annotations[Constants.enqueuedTime] as number);
}
if (msg.message_annotations[Constants.lockedUntil] != null) {
props.lockedUntilUtc = new Date(msg.message_annotations[Constants.lockedUntil] as number);
}
}
if (msg.ttl != null && msg.ttl >= Constants.maxDurationValue - props.enqueuedTimeUtc.getTime()) {
props.expiresAtUtc = new Date(Constants.maxDurationValue);
} else {
props.expiresAtUtc = new Date(props.enqueuedTimeUtc.getTime() + msg.ttl!);
}
const rcvdsbmsg: ReceivedMessageInfo = {
_amqpMessage: msg,
_delivery: delivery,
deliveryCount: msg.delivery_count,
lockToken:
delivery && delivery.tag && delivery.tag.length !== 0
? uuid_to_string(
shouldReorderLockToken === trueprops.deadLetterSource = msg.message_annotations[Constants.deadLetterSource];
}
if (msg.message_annotations[Constants.enqueueSequenceNumber] != null) {
props.enqueuedSequenceNumber = msg.message_annotations[Constants.enqueueSequenceNumber];
}
if (msg.message_annotations[Constants.sequenceNumber] != null) {
if (Buffer.isBuffer(msg.message_annotations[Constants.sequenceNumber])) {
props.sequenceNumber = Long.fromBytesBE(msg.message_annotations[Constants.sequenceNumber]);
} else {
props.sequenceNumber = Long.fromNumber(msg.message_annotations[Constants.sequenceNumber]);
}
}
if (msg.message_annotations[Constants.enqueuedTime] != null) {
props.enqueuedTimeUtc = new Date(msg.message_annotations[Constants.enqueuedTime] as number);
}
if (msg.message_annotations[Constants.lockedUntil] != null) {
props.lockedUntilUtc = new Date(msg.message_annotations[Constants.lockedUntil] as number);
}
}
if (msg.ttl != null && msg.ttl >= Constants.maxDurationValue - props.enqueuedTimeUtc.getTime()) {
props.expiresAtUtc = new Date(Constants.maxDurationValue);
} else {
props.expiresAtUtc = new Date(props.enqueuedTimeUtc.getTime() + msg.ttl!);
}
const rcvdsbmsg: ReceivedMessageInfo = {
_amqpMessage: msg,
_delivery: delivery,
deliveryCount: msg.delivery_count,
lockToken:
delivery && delivery.tag && delivery.tag.length !== 0
? uuid_to_string(