File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
sdk/servicebus/service-bus/samples Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff 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 ( ) ) ;
Original file line number Diff line number Diff 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 ) ;
You can’t perform that action at this time.
0 commit comments