Describe the bug
This was working in version 1 but not in 7 anymore
I am setting label and userProperties on the message as
const message = {
body: content,
label: label,
sessionId: sessionId,
// subject: "Scientist", -- uncomment this and label is populated as 'Scientist'
userProperties: {
deliveryType: 'email',
to: toAddress,
totalPages: totalPages,
sequenceNumber: sequenceNumber,
startDate: startDate,
endDate: endDate
}
};
But nothing gets populated on the message. Sending the message on a session enabled subscription.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
label and userProperties gets populated
Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Full Method
async function sendMessage(sender, sequenceNumber, content, label, totalPages, startDate, endDate) {
// If sending to a Topic, use createTopicClient instead of createQueueClient
const message = {
body: content,
label: label,
sessionId: sessionId,
// subject: "Scientist",
userProperties: {
deliveryType: 'email',
to: toAddress,
totalPages: totalPages,
sequenceNumber: sequenceNumber,
startDate: startDate,
endDate: endDate
}
};
console.log(`Sending message: "${message.label}" to "${sessionId}"`);
await sender.sendMessages(message);
}
Thanks for reporting @shashankkr
In v7, the userProperties and label on the message were renamed to applicationProperties and subject to be in sync with the AMQP spec. We did this across languages as part of our new SDKs.
We realize that we should have done a better job at communicating this in our migration guide which is linked from the readme for the package in npm and github as well as from our changelog. We will do so immediately.
You mentioned that you used the v1 of the package before. Can you share how you got to know about the new v7 and if you found our migration guide helpful at all?
@richardpark-msft Am thinking we could have a section for just "messages" in the migration guide and list the below?
@ramya-rao-a Thanks for reply. It took me some time but I figured it out after reading this doc
But if you see the v7 examples, they are still using the label property which actually got me confused
If these samples are not correct then the sample link on this page needs to be updated
@HarshaNalluru told me about the upcoming version and I have been looking forward to it. Migration guide was helpful but I think there should be a link to the complete change log. Just my 2 cents :)
Thanks for spotting @shashankkr.
The samples need updates.
Most helpful comment
@ramya-rao-a Thanks for reply. It took me some time but I figured it out after reading this doc
But if you see the v7 examples, they are still using the label property which actually got me confused
sample1, sample2, sample3 etc
If these samples are not correct then the sample link on this page needs to be updated
@HarshaNalluru told me about the upcoming version and I have been looking forward to it. Migration guide was helpful but I think there should be a link to the complete change log. Just my 2 cents :)