Service Bus VII: Message Validation
Table of Contents
Azure Service Bus
Service Bus Explorer
Download and Installation
- Open GitHub for Service Bus Explorer
- Install Service Bus Explorer.
Configuration
- Open Service Bus Explorer.
- Click File.
- Select Connect.
- Under Service Bus Namespaces, select Enter a connection String.
- In the connection String, enter the namespace connection String.
- In Azure, navigate to your Resource Group.
- Select your Service Bus Namespace.
- Navigate to Shared access policies.
- Press RootManageSharedAccessKey.
- Copy the Primary Connection String to your clipboard.
- Navigate back to Service Bus Explorer.
- Paste the Primary Connection String into the connection string section.
- Click OK.
Read Messages
- Expand Topics.
- Expand your synchronized Topic.
- Expand Subscriptions.
- You should now see 3 subscriptions.
- matrix42.empirum.subscription
- matrix42.silverback.subscription
- matrix42.uem.subscription
- Verify if some subscriptions have a value greater than 0 in the brackets.
- Select the subscriptions with a value greater than 0.
- Click Messages.
- Make sure Peek is selected.
- Enter a Message Count (e.g., 100).
- Click OK.
- Read any of the messages.
Troubleshooting
In order to analyze messages, it might be useful to temporarily store all incoming messages in a Wire Tap. Usually, all subscribers will remove all messages almost immediately, and therefore the messages cannot be reviewed. To store messages temporarily, it is possible to create a temporary subscription within the topic that receives all messages. This subscription has no subscriber and should be configured for automated message deletion.
In Service Bus Explorer (this is also possible in the Azure portal):
- Expand Topics.
- Expand your synchronized Topic.
- Expand Subscriptions.
- Right-click on Subscriptions.
- Select Create Subscription.
- Enter Name i.e. matrix42.troubleshooting.subscription.
- Select 1 Days in the Default Message Time to Live field (depends on the amount of messages - 10 minutes might also be sufficient for troubleshooting).
- Select Create.
- New messages should now also be received in the new subscription and can be viewed as described above.
- When done with troubleshooting, it is safe to delete the temp.subscription.
By starting the troubleshooting, it might make sense to purge the temporary subscription before invoking the task in one of the systems you want to inspect.
RabbitMQ
Configuration
- Log in to the administration interface of RabbitMQ (installed by default when using the Matrix42 installation package):
- http://localhost:15672
- Enter the admin credentials provided during the installation.
Read Messages
- Select Queues.
- Select a queue that has more than 0 messages ready.
- Select Get messages.
- Enter the number of messages you want to receive.
- Review the messages.
- The message content can be copied to a JSON text formatter or a web service like https://jsonformatter.org or any local tool like Visual Studio Code for easier reading.
- Empirum sends messages as a gzip stream. Visual Studio Code supports plugins for decompressing and beautifying the messages.
Troubleshooting
In order to analyze messages, it might be useful to temporarily store all incoming messages in a "Wire Tap". Usually, all subscribers will remove all messages almost immediately, and therefore the messages cannot be reviewed. To store messages temporarily, it is possible to create a temporary queue within the exchange that receives all messages. This queue has no subscriber and should be configured for automated message deletion.
In the administration interface of RabbitMQ:
- Select Queues.
- Expand Add Queue below the list of queues.
- Select the Virtual host used during installation.
- Enter a name i.e., matrix42.troubleshooting.subscription.
- Click Message TTL in the list of optional arguments to add x-message-ttl.
- Enter the time how long messages should be stored in milliseconds i.e., 86400000 for 1 day.
- Press Add Queue.
- Select the new queue in the table.
- Expand Bindings.
- Enter the exchange name, i.e., matrix42.suem.topic, in the From exchange field.
- Click Bind.
- New messages should now also be received in the new queue and can be viewed as described above.
- When done with troubleshooting, it is safe to delete the matrix42.troubleshooting.subscription.
By starting the troubleshooting, it might make sense to purge the temporary queue before invoking the task in one of the systems you want to inspect.
ESB Statistics
Starting from version 3.0, ESB provides statistics on the number of messages consumed.
- To access these statistics, navigate to the Open Administration menu, then select Integration and Enterprise Service Bus.
- In the configuration settings, you can toggle the visibility of the statistics by selecting the appropriate grid settings. By default, all statistics are hidden.
- The Last column represents the number of messages consumed within the past 2 minutes.
- The Total column shows the cumulative number of messages consumed since the installation of ESB 3.x.
- Skipped messages are addressed to another node or the content cannot be processed.
- Unhandled messages have an unknown message type.

Debug Logging
From version 3.0 onwards, ESB supports extended logging to allow better troubleshooting.
To switch the log level to debug, locate the following file:
- C:\Program Files (x86)\Matrix42\Matrix42 Workplace Management\Dispatcher\appsettings.log.json
- In the Executors section, there’s a Singleton section. Change the MinimumLevel property to Debug.
- After making this change, restart the Matrix42.FunctionEngine.Dispatcher service. This will result in singleton logs containing additional DEBUG records about initialization, loading assemblies, and called message handlers.
- To filter the log, use the string M42.ESB.
- Change back the MinimumLevel property to Information and restart the Matrix42.FunctionEngine.Dispatcher service after troubleshooting, as the amount of log entries will be very high.
Next Steps
- Proceed with Data Provider and Connectors to extend your capabilities
- Proceed with Extensions to extend your capabilities
- Proceed with the Getting Started Guide
- Proceed with the Administrator Guide