How to send messages to or receive from Service Bus/Event Hub with Service Bus Explorer?

Published 02-15-2021 10:45 PM 2,454 Views
Microsoft

Overview

Service Bus Explorer is an open-source tool, created with Microsoft supported .NET SDKs and available on any computer with the .NET framework.  Service Bus Explorer allows users to connect to a messaging namespace (Service Bus, Event Hub, Notification Hub, and Relay) and administer their messaging entities through a GUI. The tool provides advanced features like import/export functionality or the ability to test topic, queues, subscriptions, relay services, notification hubs and events hubs.

 

Download the latest version from link below.  It is standalone so no installation is required, just unzip and run the ServiceBusExplorer.exe executable from the folder.

https://github.com/paolosalvatori/ServiceBusExplorer/releases

 

Connect to a namespace

 

1. Go to the corresponding Service Bus or Event Hub namespace in the Azure Portal.  Click on Settings-> “Shared Access Policies” and click on RootManageSharedAccessKey.  Copy the Primary Connection String and keep this value handy.
NOTE:  You need to use a connection string with Manage Claims with Service Bus Explorer. 

connectionString.png

 

2. Start Service Bus Explorer, go to "File" and click on "Connect" and in the popup window, choose "Enter connection string…" from Service Bus Namespace dropdown. And in the Connection Settings pane, under Connection String, enter Primary Connection String from step 1) and click on "OK."

SBELogin.png

 

Service Bus – Sending messages to Queues or Topics

 

1. To send a message to a Queue or a Topic, right click on the queue or topic name on the Service Bus Explorer navigation pane and select “Send Messages”.

SendMessagesMenu.png    

 

2. In the “Send Messages” popup dialog box, enter the message in the text box, select the message format and click “Start” to send the message:

SendMessagesDialogBox.png

** You can specify message properties in the “Senders” tab, and attach files to the message from “Files” tab.

 

Service Bus – Receiving messages from Queues or Topic Subscriptions

 

1. To peak or receive a message from a Queue or a topic subscription, right click on the queue or subscription name on the Service Bus Explorer navigation pane and select “Receive Messages”.

RecieveMessages.png

 

2. In the popup dialog box, it is possible to peek or receive a configurable number of messages from a queue or topic subscription:peakOrReceive.png

 

3.  When you click the Ok button in the Retrieve messages from queue (or topic subscription) dialog, messages are retrieved and shown in the following tab:receivedMessasgeList.png

 

Service Bus - Check the deadletter reason for specific messages

 

1. Once you have successfully connected to your Service Bus namespace, select one of your queue as shown below.  You can also do this for a topic subscriptions.

ReceiveDeadLetter.png

 

2. Just like receive active messages shown in the previous section, you can choose to peak or receive deadlettered messages in the popup dialog box.  Select "Peek" to peek some messages from the deadletter and click "Ok"

DeadLetterPeakOrReceive.png

 

3. You can then review the deadletter reason for each individual message as shown below 

DeadLetterReason.png

Event Hub - Sending Event messages to a Event Hub

 

1. To send a event message to a event hub, right click on the event hub name on the Service Bus Explorer navigation pane and select “Send Events”.

EventHubSendMenu.png

 

2. In the “Send Events” popup dialog box, enter the message in the text box, select the message format and click “Start” to send the message:

SendEventDialogBox.png

** You can specify message properties in the “Sender” tab, and attach files to the message from “Files” tab.

 

Event Hub - Receiving event messages through a consumer group

 

1. Once you have successfully connected to your Event Hub namespace, drill down to one of your consumer groups, right click on it, and select "Create Consumer Group Listener."
NOTE:  If your Event Hub is actively being read from, you will want to use a different consumer group from the one(s) actively being used.
 EventHubListenerMenu.png

 

2. In the listener dialog popup, click "Start" to start the consumer group listener:

NOTE: You can specify the “Starting Date Time UTC” to selectively fetch event data enqueued after this point, and check "Verbose" option to enable verbose logs.

EHListenerStart.png

 

3. Check the Log at the bottom of the screen and you can see the message receiving logs. You can also select the Events tab and check for the message body to check the actual events that are in your Event Hub. EHReceivedEventList.png

Co-Authors
Version history
Last update:
‎Feb 17 2021 05:13 PM
Updated by: