none
bts2013 r2 - wcf sql typed polling RRS feed

  • Question

  • I've changed a sql-receivelocation to a wcf-sql receivelocation.

    In the receive  a stored procedure is executed (has over time has changed so only one record at a time is received) and in polledDataAvailable I count the number of lines still to process.

    PollWhileDataFound = false and pollingInterval = 60

    Now If I have 6 records I would expect that they are processed one at a time with 60 seconds in between.

    It seems however that they get processed 2 at a time? Than 60 seconds, again 2 at a time...

    What am I not seeing? What setting could be wrong?


    Kind regards Isabelledc


    • Edited by isabelledc Wednesday, October 28, 2015 1:24 PM
    Wednesday, October 28, 2015 1:24 PM

Answers

  • This happens when receive handler you are using on receive location has more than one instance in enabled state. (just expanding RahulS_88's response little bit)


    Please mark it as answer by clicking on "Propose As Answer", if it helps. My Blog : http://dotnetizen.blogspot.com

    • Marked as answer by isabelledc Tuesday, January 19, 2016 2:31 PM
    Wednesday, October 28, 2015 2:42 PM

All replies

  • Did you check if the BizTalk environment works on Active-Active Configuration?And can you re-check your SP as to what it returns?

    Rahul

    Wednesday, October 28, 2015 2:00 PM
  • This happens when receive handler you are using on receive location has more than one instance in enabled state. (just expanding RahulS_88's response little bit)


    Please mark it as answer by clicking on "Propose As Answer", if it helps. My Blog : http://dotnetizen.blogspot.com

    • Marked as answer by isabelledc Tuesday, January 19, 2016 2:31 PM
    Wednesday, October 28, 2015 2:42 PM
  • Please check your polling Statement query, it  should retrieve one record t a time  and as Rajesh mentioned make sure only one receive location is running with this configuration.

    Thanks,

    Chandra

    Wednesday, October 28, 2015 3:16 PM
  • Hi Isabelle,

    When you set the below

    PollWhileDataFound = false

    pollingInterval = 60

    PollDataAvilableStatement

     UseAmbientTransactions = True

    polling statement

    Every 60 seconds PollDataAvilableStatement is executed and if it returns a positive integer then it calls polling statement to get the data. So please check your query to return only one record at a time and you can use SELECT TOP 1 in the query

    If you don't want to wait for 60 seconds and want to process the data as soon as it is available then set the below. In this case it ignores PollDataAvilableStatement

    PollWhileDataFound = True

    pollingInterval = 60

    PollDataAvilableStatement

     UseAmbientTransactions = True

    polling statement


    JB

    Wednesday, October 28, 2015 8:28 PM
  • I do have a select top 1 in the query so I'm quite certain I can only receive one record.

    But indeed I now have 2 applicationservers that are both hostinstance to the wcf-custom adapter. This must indeed be why I receive 2 at a time (I used to have only 1 so the penny didn't drop immediately)

    In my previous environment I only had one applicationserver, I'm still getting used to the fact that I now have 2 :-)

    Although I must admit I didn't expect this behaviour. I had hoped that both instances would know about the 60 seconds and that host instance nr 1 one perhaps do a pickup , and after 60 seconds host instance nr 2 etc etc.....

    it seems that they both pickup , both wait 60 seconds, etc etc....

    I don't want to stop one of the host instances since this is not usinig the power of biztalk.

    Again something learnt. 


    Kind regards Isabelledc

    Thursday, October 29, 2015 8:39 AM