Message Box Data
  • 11 Apr 2022
  • 9 Minutos para leer
  • Oscuro
    Ligero
  • PDF

Message Box Data

  • Oscuro
    Ligero
  • PDF

There is no Spanish content available for this article, You are viewing the fallback version (English).

In this section, the following is discussed:

  • What is the purpose of Message Box Data Monitoring
  • Setting up a Message Box Data Monitor
  • Archive And Terminate Suspended Service Instances
  • Message Box Data Monitoring Email Notifications

What is the purpose of Message Box Data Monitoring

When messages flow into the BizTalk Server, the messages get persisted in BizTalk Server's Message Box database. The service instances might move into different states such as Suspended (Resumable), Suspended (Non-Resumable), Active, Ready to Run, Dehydrated, and so on.
Once the service instance moves into a particular state that demands user intervention, this forces the BizTalk server administrator to manually log in to the BizTalk Server Administration Console and fix the problem with respect to the service instance. BizTalk360 solves this problem through the Message Box (Queries), offering administrators to query the message box database for such messages and take action without having to log in to BizTalk Server Administration Console.

Despite offering this capability to BizTalk administrators, BizTalk360 goes one step further to reduce the manual intervention that is required from the administrators. Through the Message Box Data Monitoring concept, administrators can choose what needs to be done when a service instance becomes suspended. For e.g., the administrator can set up an alarm like "If there are >20 Suspended Service Instances between 09:00 AM and 05:00 PM, resume all the instances". He can simply log in to the BizTalk360 Data Monitoring Dashboard to see the status of the message box data for the day. He can also set up email notifications for the alarm. By doing so, the administrator eliminates the need to often log in to the BizTalk360 application and check for the status of the service instances.

Setting up a Message Box Data Monitor

Follow the steps as shown below to create a Message Box Data Monitoring alarm

  1. Choose Alarm - As mentioned above, the first step to set up Message Box data monitoring is to create an alarm. Once you have created the alarm, the alarm name will be displayed in the dropdown. Select the alarm that should be used for message box data monitoring purposes
  2. Schedule Name - A meaningful name for the Message Box Data Monitor. Say, as per your requirement you want to terminate the suspended instances after every 15 minutes when the count goes above 20. The monitor name can be set as "Terminate suspended instances every 15 minutes when count > 20"
  3. Query Type - This section is very similar to the Message Box (Queries) section in BizTalk360. Select the type of query for which you want to run the data monitor. As per the above requirement, since we are looking for suspended instances, select 'Suspended Service Instances' from the drop-down
  4. Add a filter - To filter the query results based on different parameters (application name, hostname, instance status, service class, service instance id, service name, service type id)
  5. Based on only Query result count (no date/time filter)- Selecting this option will execute the query without applying any date time filter. i.e All the data will consider for SQL query execution.
    • Based on Query result with date/time range - Selecting this option will apply the Creation Time filter for SQL query execution. ( The values configured for setting trigger time, Set Monitoring Times ->At What Time, will be used for Creation Time filter ). For eg: When Monitoring set frequency is set for 1 hour, then for every SQL query execution the query will consider only 1-hour data "[DateCreated] > DATEADD(HOUR, -1, GETDATE())".
    • Based on Query result (Age)-In V10.1 age monitoring is introduced, which allows you to check the instances which are older than a specific time duration. You can provide the Age value in minutes/hours/days, only the instance created during that time will be considered for SQL Query execution. 
  6. Is Action Required - Selecting this checkbox enables you to automate tasks such as regularly terminate instances, resume instances, and so on. You can define an action such as "Whenever there are Suspended (Non-Resumable) service instances during the monitoring time range, the system should automatically terminate them. Similarly, whenever there are Suspended (Resumable) instances, the system can automatically Resume these messages. The following options are available for the Is Action Required setting:
  7. When to Action - Defines when you need to take an action - Always (or) when there is an error condition (or) a warning condition. You need to be cautious about enabling it since some of the actions performed by the system cannot be undone
  8. What Action - Defines what action needs to be taken - Resume, Suspend or Terminate. You need to be cautious about enabling it since some of the actions performed by the system cannot be undone
    When you select the action as "Terminate", you will notice the "Archive message(s) content & context associated before Terminate" checkbox. Selecting the checkbox will automatically back up the service instance details to a folder and then terminate the instance. See the below "Archive and Terminate Suspended Service Instances" section to configure the archive location
  9. Number of Retries - Click the numeric value to set the number of retries the process monitoring service should attempt
  10. Warning Threshold - Select the value from the drop-down on when you want to be notified when there is a warning. The first drop down is to select the Operator (> or =) and the second operator is to select the warning value. For e.g., When the number of service instances is> 10, throw a warning
  11. Error Threshold - Select the value from the drop-down on when you want to be notified when there is an error. The first drop down is to select the Operator (> or =) and the second operator is to select the warning value. For e.g., When the number of service instances is> 20, throw an error
  12. Send Instance Detail In Notification - Selecting this checkbox will send the instance details and exception description in the notification email when the number of instances exceeds the warning and/or error threshold level
  13. Send message content and context in the notification email - Selecting this checkbox will send the detailed message content and message context in the notification email when the number of instances exceeds the warning and/or error threshold level
  14. How often you want to monitor - Select the duration of how often you want to monitor for suspended service instances. The options are - Daily, Weekly, and Monthly. Depending on the selection, you can add further filter criteria on how often you want to monitor
  • Daily - will set up the data monitor to execute everyday
  • Weekly - The data monitor will execute on the selected days of the week (Every Day, Monday-Friday, or the selected day of choice). To add a single day of the week, click the control and select the day of your choice
  • Monthly - The data monitor will execute on the selected day of the month. To add a specific day of the month, enter the date in the space provided or select the date from the drop-down
    If a particular day is not present in the month (say, 29th Feb), then the system will skip that month and generate the results on the specified day in the next month

15. When during the day - Select the time when the data monitor must execute on a particular day during business hours. You can customize your business hours by selecting the values from the Business Day Start and Business Day End options

By default, the business day start time is 9 AM and business day end time is 5 PM

Depending on the business hour selection, the following options are available when you want the data monitor to execute on a particular day

  • At the end of the business day - If this option is chosen, the data monitor will execute depending on the value chosen in the Business Day End field. For e.g, if the business end time specified is 5 PM (default value), the data monitor will execute exactly at 5 PM
    Monitor every X minutes/hours - You can define specific intervals during the business hours when the data monitor should execute. The options available are Minutes and Hours

16. Minutes - Select the number of minutes after which the data monitor should execute. E.g., 30 minutes means the data monitor will execute once every 30 minutes

The minimum time interval supported is 15 minutes, which means the data monitor will execute 4 times (15 minutes x 4 = 60 minutes) in an hour

17. Hours - Select the number of hours after which the data monitor should execute during the business hours. E.g., 2 hours means the data monitor will execute once in 2 hours between 9 AM and 5 PM. The minimum time interval supported is 1 hour.

18. Set Date and Time - This section can be used to define advanced settings for data monitoring. You can define a date range (from the date and to date) when you want the data monitor to execute. You can set up a data monitor to start, say, on a Monday and end on the next Tuesday. In addition to this, you can set up the other settings mentioned above in the previous steps. This means the data monitor will only start to run next Monday and will not execute after Tuesday
By default, the Advanced section will be in a Collapsed state. Click the '>' button to expand the Advanced section and make the settings

19. Summary - The summary information will automatically be populated based on the information selected in the previous columns

20. Save - Once all the values are selected in the previous steps, click Save to save the settings


MessageBox Data Monitoring Email Notifications

Once the MessageBox Data Monitor is created and configured, it will execute during the specified time intervals. The Data Monitoring dashboard will display the status of the MessageBox data monitor on a specific date at a specific time interval in the calendar chart control.

Based upon how you configured your Data Monitoring alarm, emails might get triggered to the email id(s) which are specified while creating that Data Monitoring alarm.

The email alert(s) will contain the Message Box Data Monitor Execution Results of the data monitor. By default, if you only selected the 'Use this alarm for Process Monitor Alerts' option, you will only receive the Failure emails to the configured email address(es). Alternatively, if you also selected the 'Notify on Success as well' option, you will receive the success alert emails as well to your mailbox. 

The email notification provides the detailed status of the data monitor - the status of execution, the warning & error count as defined in the data monitor, and the actual count of service instances that were in the particular state when the data monitor executed. The email notification also provides the detail of whether any specific action was taken by the data monitor (suspend/terminate/resume) as defined in the data monitor.

Service Instances action based on Retry Count

You may face a situation there may not be any action on suspended instances when you configured automated action in Message Box Data Monitoring. BizTalk360 Data Monitoring schedule results show that the task action is successful but no action has been taken.

Retry Count

BizTalk360 will take action against the suspended instances, irrespective of the "Number of Retries" count set in the schedule. If the Instance is suspended in the port then BizTalk360 will check how many times the instance is retried by BizTalk Server.

If the number of retries done by BizTalk is less than or equal to the count set in BizTalk360 then it will resume the instance until it exceeds the count set. If the number of retries done by BizTalk is greater than the count set in BizTalk360 then it will stop resuming the instance on further monitoring schedule.

Check the retry count between the BizTalk artifact and the BizTalk360 count in the UI. If the BizTalk360 Configured Value is 3 and the BizTalk server's Current Retry Count is 4 so the BizTalk360 didn't take any action.

You can increase the number of retries count and check if it is resuming the instances from next time.


¿Te ha sido útil este artículo?

What's Next