Skip to content

Commit d35744d

Browse files
[Service Bus] Minor sample update (Azure#12670)
1 parent db8b0a0 commit d35744d

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

sdk/servicebus/service-bus/samples/javascript/scheduledMessages.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ async function sendScheduledMessages(sbClient) {
4949

5050
const messages = listOfScientists.map((scientist) => ({
5151
body: `${scientist.firstName} ${scientist.lastName}`,
52-
label: "Scientist"
52+
subject: "Scientist"
5353
}));
5454

5555
const timeNowUtc = new Date(Date.now());

sdk/servicebus/service-bus/samples/typescript/src/scheduledMessages.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,12 @@ async function sendScheduledMessages(sbClient: ServiceBusClient) {
5454
// createSender() handles sending to a queue or a topic
5555
const sender = sbClient.createSender(queueName);
5656

57-
const messages: ServiceBusMessage[] = listOfScientists.map((scientist) => ({
58-
body: `${scientist.firstName} ${scientist.lastName}`,
59-
label: "Scientist"
60-
}));
57+
const messages: ServiceBusMessage[] = listOfScientists.map(
58+
(scientist): ServiceBusMessage => ({
59+
body: `${scientist.firstName} ${scientist.lastName}`,
60+
subject: "Scientist"
61+
})
62+
);
6163

6264
const timeNowUtc = new Date(Date.now());
6365
const scheduledEnqueueTimeUtc = new Date(Date.now() + 10000);

0 commit comments

Comments
 (0)