Service Bus Explorer 2.5 now available!


I just released an improved version of the Service Bus Explorer tool based on the Microsoft.ServiceBus.dll 2.5.3.0.

The zip file contains:

  • The source code for the Service Bus Explorer 2.5.2.0. This version of the tool uses the Microsoft.ServiceBus.dll 2.5.3.0 that is compatible with the current version of the Windows Azure Service Bus, but not with the Service Bus 1.1, that is, the current version of the on-premises version of the Service Bus.
  • The Service Bus Explorer 2.1.3.0. This version can be used with the Service Bus 1.1. The Service Bus Explorer 2.1 uses the Microsoft.ServiceBus.dll client library which is compatible with the Service Bus for Windows Server 1.1 RTM version. You can download the source code of the Service Bus Explorer 2.1.3 from my OneDrive.
  • The Service Bus Explorer 1.8. This version can be used with the Service Bus 1.0

This version introduces the following updates:

  • Updated Microsoft.ServiceBus.dll to version 2.5.3.0.
  • Added support for the EnableExpress property of queues and topics:

  • The following bug has been fixed:
    1. Go to a topic with two or more enabled subscriptions. All the subscription icons show enabled state.
    2. Right click one subscription and click 'Disable Subscription', icon shows disabled state.
    3. Go to parent 'Subscriptions' node and 'Refresh': the disabled subscription shows an *enabled* icon even though it is disabled.
  • The logging mechanism in the PartitionListernerControl has been highly improved. Now logging stops as soon as the user clicks the Stop or Close button in the Consumer Group and Partition Listener dialog.

  • The code of the Consumer Group and Partition Listener has been dramatically improved:
  • The tool now uses the EventProcessorFactory<T> : IEventProcessorFactory class for creating instances of the EventProcessor : IEventProcessor class that are used to process events from event hub partitions.
  • The tool provides a custom checkpoint manager class: EventProcessorCheckpointManager : ICheckpointManager. In order to use the client-side checkpoint mechanism introduced by the tool, make sure to check the Checkpoint control in the Consumer Group and Partition Listener dialog as shown in the picture below.

  • The application uses the checkpoint manager to perform checkpoints in the in-process memory and persists checkpoints to a JSON file at the exit. At the start, the application reads checkpoints from the EventHubPartitionCheckpoints.json file located in the same directory of the tool. To remove all checkpoints, it's sufficient to delete the file. You can also open the file and selectively delete checkpoints for specific event hub partitions.
[ 
  { 
    "namespace": "eventhubs", 
    "eventHub": "basicsampleeventhub", 
    "leases": { 
      "0": { 
        "PartitionId": "0", 
        "Owner": "ServiceBusExplorer", 
        "Token": null, 
        "Epoch": 0, 
        "Offset": "244712", 
        "SequenceNumber": 1699 
      }, 
      "1": { 
        "PartitionId": "1", 
        "Owner": "ServiceBusExplorer", 
        "Token": null, 
        "Epoch": 0, 
        "Offset": "127416", 
        "SequenceNumber": 885 
      }, 
      "7": { 
        "PartitionId": "7", 
        "Owner": "ServiceBusExplorer", 
        "Token": null, 
        "Epoch": 0, 
        "Offset": "335176", 
        "SequenceNumber": 2327 
      }, 
      "2": { 
        "PartitionId": "2", 
        "Owner": "ServiceBusExplorer", 
        "Token": null, 
        "Epoch": 0, 
        "Offset": "86152", 
        "SequenceNumber": 599 
      }, 
      "4": { 
        "PartitionId": "4", 
        "Owner": "ServiceBusExplorer", 
        "Token": null, 
        "Epoch": 0, 
        "Offset": "238264", 
        "SequenceNumber": 1654 
      }, 
      "3": { 
        "PartitionId": "3", 
        "Owner": "ServiceBusExplorer", 
        "Token": null, 
        "Epoch": 0, 
        "Offset": "-1", 
        "SequenceNumber": 0 
      }, 
      "5": { 
        "PartitionId": "5", 
        "Owner": "ServiceBusExplorer", 
        "Token": null, 
        "Epoch": 0, 
        "Offset": "-1", 
        "SequenceNumber": 0 
      }, 
      "6": { 
        "PartitionId": "6", 
        "Owner": "ServiceBusExplorer", 
        "Token": null, 
        "Epoch": 0, 
        "Offset": "-1", 
        "SequenceNumber": 0 
      } 
    } 
  } 
]

  • This version of the tool introduces the possibility to send events directly to a specific event hub partition using the EventHubSender class. 
  • A bug affecting the dimension of the controls in the Messages and Deadletter Messages dialogs for queues and subscriptions has been fixed. To send messages to a specific event hub partition, right click a partition and choose Send Events as shown in the picture below.

  • When you send messages to a specific partition, the EventData.PartitionKey property is ignored. For this reason, the Update PartitionKey and No PartitionKey checkboxes are not available when sending messages to a given event hub partition.

  • When a queue or subscription is partitioned, now the tool invokes the MessageReceiver.Peek and MessageReceiver.Receive methods respectively, to peek and read messages one by one from the current queue, subscription or deadletter queue, instead of using the MessageReceiver.PeekBatch or MessageReceiver.ReceiveBatch methods. In fact, when the entity is partitioned, the batch methods read messages only from a single partition, hence they don't return all the messages from the 16 partitions or fragments that form the entity.
  • Fxed the value shown by the Max Size in Gigabytes slider when the queue or topic is partitioned. In fact, when the queue or subscription is partitioned, the QueueDescription.MaxSizeInMegabytes and TopicDescription.MaxSizeInMegabytes property contains the size you specified when you created the entity (1024;2048;3072;4096;5120) multiplied by 16, that is, the number of fragments that compose the partitioned entity.
  • Fixed a problem that happened when updating the value of the ForwardTo and ForwardDeadLetteredMessagesTo properties of a subscription.
  • This version of the Service Bus Explorer introduces the possibility to save individual or multiple messages to a file in JSON format. See below for details.
  • In the Messages or Deadletter tab of a queue or subscription you can save a single message to a JSON file: right click the message to open the context menu and click Save Selected Message as shown in the picture below.

      This opens the Save File As dialog as shown in the picture below.

    The JSON file contains the body and properties of the selected BrokeredMessage object. Properties are in camel case.

    {"body": {"deviceid": 84, 
        "value": 68}, 
      "contentType": null, 
      "correlationId": null, 
      "deliveryCount": 1, 
      "enqueuedSequenceNumber": 1, 
      "enqueuedTimeUtc": "2014-12-03T16:39:48.4958476Z", 
      "expiresAtUtc": "9999-12-31T23:59:59.9999999", 
      "forcePersistence": false, 
      "isBodyConsumed": false, 
      "isLargeMessage": false, 
      "label": "Service Bus Explorer", 
      "lockedUntilUtc": null, 
      "lockToken": null, 
      "messageId": "5cbc08aa-dca5-434b-bc27-afc8ba98307f", 
      "partitionKey": "18", 
      "properties": {"deviceId": 84, 
        "value": 68, 
        "time": 635532215878943345, 
        "city": "Milan", 
        "country": "Italy"}, 
      "replyTo": null, 
      "replyToSessionId": null, 
      "scheduledEnqueueTimeUtc": "0001-01-01T00:00:00", 
      "sequenceNumber": 281474976710657, 
      "sessionId": null, 
      "size": 229, 
      "state": 0, 
      "timeToLive": "10675199.02:48:05.4775807", 
      "to": null, 
      "viaPartitionKey": null 
    }

  • As an alternative, you can double click a message in the Messages or Deadletter tab for queue or subscription to open the Repair and Resubmit Message dialog and then click the Save button as shown in the picture below.

  • In the Messages or Deadletter tab of a queue or subscription you can save multiple messages to a JSON file: select multiple messages and right click one of them to open the context menu and then click Save Selected Messages as shown in the picture below.

      This opens the Save File As dialog as shown in the picture below.

    The JSON file contains an array of items. Each item contains the body and properties of one of the selected BrokeredMessage objects. Properties are in camel case.

    [ 
      {"body": {"deviceid": 36, 
          "value": 93}, 
        "contentType": null, 
        "correlationId": null, 
        "deliveryCount": 1, 
        "enqueuedSequenceNumber": 1, 
        "enqueuedTimeUtc": "2014-12-03T16:39:48.7794889Z", 
        "expiresAtUtc": "9999-12-31T23:59:59.9999999", 
        "forcePersistence": false, 
        "isBodyConsumed": false, 
        "isLargeMessage": false, 
        "label": "Service Bus Explorer", 
        "lockedUntilUtc": null, 
        "lockToken": null, 
        "messageId": "197c5f6b-635c-437e-b419-5b346b626c35", 
        "partitionKey": "0", 
        "properties": {"deviceId": 36, 
          "value": 93, 
          "time": 635532215878943345, 
          "city": "Milan", 
          "country": "Italy"}, 
        "replyTo": null, 
        "replyToSessionId": null, 
        "scheduledEnqueueTimeUtc": "0001-01-01T00:00:00", 
        "sequenceNumber": 4785074604081153, 
        "sessionId": null, 
        "size": 228, 
        "state": 0, 
        "timeToLive": "10675199.02:48:05.4775807", 
        "to": null, 
        "viaPartitionKey": null 
      }, 
      {"body": {"deviceid": 85, 
          "value": 29}, 
        "contentType": null, 
        "correlationId": null, 
        "deliveryCount": 1, 
        "enqueuedSequenceNumber": 2, 
        "enqueuedTimeUtc": "2014-12-03T16:39:56.5925297Z", 
        "expiresAtUtc": "9999-12-31T23:59:59.9999999", 
        "forcePersistence": false, 
        "isBodyConsumed": false, 
        "isLargeMessage": false, 
        "label": "Service Bus Explorer", 
        "lockedUntilUtc": null, 
        "lockToken": null, 
        "messageId": "fa9482b5-6dff-4268-9a5c-3d9b08bb358c", 
        "partitionKey": "942", 
        "properties": {"deviceId": 85, 
          "value": 29, 
          "time": 635532215962583503, 
          "city": "Milan", 
          "country": "Italy"}, 
        "replyTo": null, 
        "replyToSessionId": null, 
        "scheduledEnqueueTimeUtc": "0001-01-01T00:00:00", 
        "sequenceNumber": 562949953421314, 
        "sessionId": null, 
        "size": 230, 
        "state": 0, 
        "timeToLive": "10675199.02:48:05.4775807", 
        "to": null, 
        "viaPartitionKey": null 
      }, 
      {"body": {"deviceid": 84, 
          "value": 68}, 
        "contentType": null, 
        "correlationId": null, 
        "deliveryCount": 1, 
        "enqueuedSequenceNumber": 1, 
        "enqueuedTimeUtc": "2014-12-03T16:39:48.4958476Z", 
        "expiresAtUtc": "9999-12-31T23:59:59.9999999", 
        "forcePersistence": false, 
        "isBodyConsumed": false, 
        "isLargeMessage": false, 
        "label": "Service Bus Explorer", 
        "lockedUntilUtc": null, 
        "lockToken": null, 
        "messageId": "5cbc08aa-dca5-434b-bc27-afc8ba98307f", 
        "partitionKey": "18", 
        "properties": {"deviceId": 84, 
          "value": 68, 
          "time": 635532215878943345, 
          "city": "Milan", 
          "country": "Italy"}, 
        "replyTo": null, 
        "replyToSessionId": null, 
        "scheduledEnqueueTimeUtc": "0001-01-01T00:00:00", 
        "sequenceNumber": 281474976710657, 
        "sessionId": null, 
        "size": 229, 
        "state": 0, 
        "timeToLive": "10675199.02:48:05.4775807", 
        "to": null, 
        "viaPartitionKey": null 
      } 
    ]

  • In the Consumer Group or Partition Listener dialog you can save a single event to a JSON file: right click the event under the Events tab to open the context menu and click Save Selected Event as shown in the picture below.

      This opens the Save File As dialog as shown in the picture below.

    The JSON file contains the body and properties of the selected EventData object. Properties are in camel case.

    { 
      "body": { 
        "deviceid": 6, 
        "name": "device006", 
        "value": 50, 
        "location": "Milan" 
      }, 
      "enqueuedTimeUtc": "2014-11-06T17:18:01.057Z", 
      "offset": "208", 
      "partitionKey": "device006", 
      "properties": { 
        "id": 6, 
        "name": "device006", 
        "location": "Milan", 
        "value": 50 
      }, 
      "sequenceNumber": 1, 
      "systemProperties": { 
        "Publisher": "device006", 
        "PartitionKey": "device006", 
        "EnqueuedTimeUtc": "2014-11-06T17:18:01.057Z", 
        "SequenceNumber": 1, 
        "Offset": "208" 
      } 
    } 

  • As an alternative, you can double click an event in the Consumer Group or Partition Listener dialog to open the View Event Data dialog and then click the Save button as shown in the picture below.

  • In the Consumer Group or Partition Listener dialog you can save multiple events to a JSON file: select multiple events and right click one of them to open the context menu and then click Save Selected Events as shown in the picture below. 

      This opens the Save File As dialog as shown in the picture below.

    The JSON file contains an array of items. Each item contains the body and properties of one of the selected EventData objects. Properties are in camel case. 

    [ 
      { 
        "body": { 
          "deviceid": 6, 
          "name": "device006", 
          "value": 26, 
          "location": "Milan" 
        }, 
        "enqueuedTimeUtc": "2014-11-06T17:18:03.267Z", 
        "offset": "624", 
        "partitionKey": "device006", 
        "properties": { 
          "id": 6, 
          "name": "device006", 
          "location": "Milan", 
          "value": 26 
        }, 
        "sequenceNumber": 3, 
        "systemProperties": { 
          "Publisher": "device006", 
          "PartitionKey": "device006", 
          "EnqueuedTimeUtc": "2014-11-06T17:18:03.267Z", 
          "SequenceNumber": 3, 
          "Offset": "624" 
        } 
      }, 
      { 
        "body": { 
          "deviceid": 6, 
          "name": "device006", 
          "value": 23, 
          "location": "Milan" 
        }, 
        "enqueuedTimeUtc": "2014-11-06T17:18:02.173Z", 
        "offset": "416", 
        "partitionKey": "device006", 
        "properties": { 
          "id": 6, 
          "name": "device006", 
          "location": "Milan", 
          "value": 23 
        }, 
        "sequenceNumber": 2, 
        "systemProperties": { 
          "Publisher": "device006", 
          "PartitionKey": "device006", 
          "EnqueuedTimeUtc": "2014-11-06T17:18:02.173Z", 
          "SequenceNumber": 2, 
          "Offset": "416" 
        } 
      }, 
      { 
        "body": { 
          "deviceid": 6, 
          "name": "device006", 
          "value": 50, 
          "location": "Milan" 
        }, 
        "enqueuedTimeUtc": "2014-11-06T17:18:01.057Z", 
        "offset": "208", 
        "partitionKey": "device006", 
        "properties": { 
          "id": 6, 
          "name": "device006", 
          "location": "Milan", 
          "value": 50 
        }, 
        "sequenceNumber": 1, 
        "systemProperties": { 
          "Publisher": "device006", 
          "PartitionKey": "device006", 
          "EnqueuedTimeUtc": "2014-11-06T17:18:01.057Z", 
          "SequenceNumber": 1, 
          "Offset": "208" 
        } 
      } 
    ] 


Comments (12)

  1. Will Smith says:

    Any news on if/when the on-premise servicebus will be upgraded to have the azure features?

  2. David says:

    I clicked on the SkyDrive link and it seems broken…

  3. Bartek says:

    Hi, Where can we find a download link?

  4. Hi Bartek

    The link is at the beginning of this post. It's sufficient to search for Service Bus Explorer on live.com or google and the first link that comes up is the page where you can download the tool. However, the link is code.msdn.microsoft.com/…/Service-Bus-Explorer-f2abca5a.

    Ciao

    Paolo

  5. WTF Chris says:

    I'm running WSB 1.1 and as you stated the newest version is not compatible with WSB.  The SKyDrive link does not appear to be working.  Where can I find the latest/greatest version that works with WSB?

  6. Hi Chris

    You can find the executable of the Service Bus Explorer 2.1.3 in the zip file. If you want the source code, I just updated the link to my OneDrive (the link was broken as you said, thanks for the heads up). 🙂

    Ciao

    Paolo

  7. Thomas Linde says:

    Thanks Paolo for your fantastic work! We, me and my Team really appreciate it!

  8. Thanks Thomas

    If you have any questions or feedbacks, please contact me on my email address. You can find it in the About form of the tool. In which team do you work? Thanks!

    Ciao

    Paolo

  9. Subhash Ghimire (CloudFronts) says:

    Hi Paolo, Indeed I must say Service Explorer is great Help to see the messages in Azure Service Bus Queue.

    I have a issue if you could throw some light. I have written a WCF service that gets the account Name from Dynamics CRM. Whenever a new account Name is created in CRM, a message is pushed to Service Bus Queue. When I check in BUS EXplorer I see the XML message has header that has encoding in UTF-8. This is even though I checked the message that is a brokered message using XML serialization. (Using Visual Studio 2015), its UTF-16 encoding. So I am not sure what a XML message with UTF 16 when it goes to Queue in Service Bus gets converted to UTF 8. My Pain area is I have created a Bridge using BIzTalk Services Template and deployed. This has  a Queue listener — one way XML bridge — and –External Web Service endpoint. Its accepts only utf 16 encoding and I am unable to enforce it to listen to UTF 8.

    So as a testing , using the tool you created BUS EXPLORER 2.6.5.0 I manually change the UTF from 8 to UTF-16 and resubmit to same Queue and then meesage gets successfully processed and I see the records being created in Target CRM.

    So to Summarise, My Query to you is as below.

    1. Can we enforce the UTF encoding either 8 or 16 at Service Bus Queue level and while developing BizTalk service solution in Visual Studio 2012? If yes, please suggest the way? If No, possible work around on this.  

    Thanks in Advance.

    —————————————————————————————– My Simple Test Code is as below———————–

  10. Subhash Ghimire (CloudFronts) says:

    Continuing from earlier Comment

    ——————-My Code is as below——————

    namespace CFS.BizTalkPOC.CrmService

    {

       public class CrmService : ICrmService

       {

                   DataAccessLayer DAL = new DataAccessLayer();

           private static QueueClient queueClient;

           private static string QueueName = "MyQueueName";

           const Int16 maxTrials = 4;

           public string GetData(int value)

           {

               return string.Format("You entered: {0}", value);

           }

           public CompositeType GetDataUsingDataContract(CompositeType composite)

           {

               if (composite == null)

               {

                   throw new ArgumentNullException("composite");

               }

               if (composite.BoolValue)

               {

                   composite.StringValue += "Suffix";

               }

               return composite;

           }

           //Send Data from CRM to Service Bus queue

           public void SendAccountData(string accountid, string accountname, string accountphone)

           {

               Account account = new Account();

               account.AccountId = accountid;

               account.AccountName = accountname;

               queueClient = QueueClient.Create(QueueName);

              BrokeredMessage msg = CreateBrokeredMessage(accountid, account); // working Code//

               queueClient.Send(msg);

           }

           private static BrokeredMessage CreateBrokeredMessage(string messageId, Account account)

           {

             BrokeredMessage message = new BrokeredMessage(DataContractSerializer(account)); //working code

               message.MessageId = messageId;

               return message;

           }

           //Send Data from XML One way bridge to Target CRM

           public void SendDataToCrm(string accountid, string accountname)

           {

               Entity newRecord = new Entity("account");

               newRecord["name"] = accountname;

               DAL.Create(newRecord);

           }

           //To serialze object to XML

           public static string DataContractSerializer<T>(T value)

           {

               var serializer = new XmlSerializer(typeof(T));

               var settings = new XmlWriterSettings

               {

                   Encoding = new UTF8Encoding(true), //change encoding to match schema encoding

                   Indent = false,

                   OmitXmlDeclaration = false,

                   NewLineHandling = NewLineHandling.None

               };

               //XmlSerializer serializer = new XmlSerializer(typeof(LibraryType));

               using (var stringWriter = new StringWriter())

               {

                   using (var xmlWriter = XmlWriter.Create(stringWriter, settings))

                   {

                       serializer.Serialize(xmlWriter, value);

                   }

                  return stringWriter.ToString();

               }

           }

       }

    }

  11. Hi Subhash

    Service Bus topics and queues are agnostic with respect to the content type of the message. You can use different formats and serialization types for the message body. See abhishekrlal.com/…/formatting-the-content-for-service-bus-messages for guidance. My tool only supports a subset of the options specified in the article, basically string, stream and WCF (which is not included in the article). Said that, you can download the code of the tool and customize it to fit your needs.  Hope this helps!

    Ciao

    Paolo

  12. encoding 8 bit and 16 bit control in Queues in Azure Service Bus says:

    Hi Paolo,

    Thanks a lot for the response. Yes You are correct. Also thanks for pointing to Abhishek's blog.

    Cheers.

    Subhash

Skip to main content