JavaScript ServiceBus EventHub Test Page

Enter temperature value:

Enter area:




                      
                            // Demonstrates how to send event data to service bus event hub.
                            // Here we set the Event Data body. This will be the event payload.
                            eventBody = { "temperature": txtTemp.value, "area": txtArea.value };
                            
                            // Note, EventData does not support properties.
                            
                            // Message corresponds the EventData class from .NET SDK.
                            var msg = new EventData(eventBody);
                          
                            // This sends the message to the queue and registers the    
                            // the callback to receive the result.
                            eventHubClient.sendMessage(msg, function (messagingResult) {
                                $("#result").html(messagingResult.result);
                            });
                       
                

Event Data:


Message Body:


Go back