monitor and alert if more than x messages are queued in Singleton RRS feed

  • Question

  • Hi,

    I have a singleton orchestration which sometimes gets 100s of messages queued up for processing as one of the messages might be invalid or the service on the send port was down etc. 

    Is there a way to monitor the number of queued up messages for this process and trigger an alert if the queue exceeds x number of messages.

    Best Regards,



    Friday, April 20, 2018 8:13 AM

All replies

  • Hi, maybe you can try to use PowerShell / Performance Counters.

    It will be good to have dedicated BizTalk host instance for that orchestration. 

    Get-Counter -Counter "\BizTalk:Messaging(*)\Pending transmitted messages" | Select-Object -Expand CounterSamples | Where-Object {$_.InstanceName -eq "dedicated instance name"}).CookedValue

    and create alert when CookedValue > 100

    Same should be possible via Performance Monitor / Create new Data Collector Set / Performance Counter Alert

    more info about perfmon

    Friday, April 20, 2018 9:36 AM
  • Thanks a lot for the pointers. I will implement them.


    Friday, April 20, 2018 9:59 AM
  • Well...what is the actual problem?  100's of queued messages doesn't sound like a lot.

    But if they're backing up because the process has faulted, then knowing the number of queued messages still doesn't matter, you need to fix the process so it doesn't get stuck.

    Meaning, I wouldn't spend the time adding such telemetry without fixing the real problem first.

    Monday, April 23, 2018 4:25 AM
  • yes of course it's better to fix this on application side but meanwhile or for monitoring purpose you can use perfmon alert etc.
    Monday, April 23, 2018 6:20 AM
  • for anyone looking for a solution for a similar problem, incase you are using BizTalk360, it was pretty straight forward to configure an alert. It fixed my problem.

    monitoring -> message box data monitoring alarm.

    in Data Filter, select 

    MessageStatus = "In Process" , "Service Class" = "Orchestration", ServiceName = "MyOrchestration"

    Am sure this query can also be done without BizTalk360 I guess :)


    Friday, September 20, 2019 12:21 PM