none
Ordered Delivery - Send Port RRS feed

  • Question

  • I have messages coming from Source system, with Orchestration processing and sending to destination system using Send Port calling web services.
    How to make sure the messages processed are successfully transmitted to the destination system ?

    On Send Port do I need to set and enable Ordered Delivery and Stop sending subsequent messages on current message failure ?

    1) If I do above, will this ensure me the messages are definitely delivered to destination system ?

    2) does WCF-WebHTTP support ordered delivery on send port .

    3) 3) There is Delivery Notification on logical Send port. What is use of it ?

    Experts Please advise


    RH



    • Edited by Dan2890 Friday, December 13, 2019 4:42 PM a
    Friday, December 13, 2019 4:25 PM

All replies

  • 1) The Ordered Delivery on the Send Port will send message in the order that things are committed to the message box by the Orchestrations.  So if you Orchestrations publish message out of order, they will get delivered out of order.  If you want to ensure that this doesn't happen you need to look at Singleton patterns.

    2) Yes

    3) This is especially useful when you have a one way send port and want the Orchestration to know that the message has been successfully sent or failed, and not just successfully committed to the message box


    Sunday, December 15, 2019 8:16 PM
  • Well, Singleton (sequential convoy) pattern helps in accumulating multiple similar type of messages into 1 single message and send out. But my requirement is FIFO, the first message that comes in also needs to go out first. These messages needs to be sent as individual. How to do this ?

    RH

    Sunday, December 15, 2019 8:59 PM
  • Singleton Orchestrations can also be used to ensure that messages are processed in order, but instead of accumulating messages, it just picks them up one by one and publishes them one by one, so maintaining the order.

    Usually you want to identify at what level you need to FIFO, is it all message of that type, or is it only for message for a particular property, e.g. Customer #, Order # ?  Then build your Orchestration based on that.


    Sunday, December 15, 2019 9:11 PM
  • but how does the Orchestration determine the messages are processed in order ?

    I mean how does it know which message came first ? at what timestamp and so on ?


    RH

    Sunday, December 15, 2019 9:17 PM
  • To achieve this you either need the Orchestration to be calling something that guarantees the order, like a message queue, or an interface or database that can give you the messages in order.

    You will want to avoid adapters such as File, FTP(s), SFTP that don't guarantee the order.

    If the system sending you the messages or the adapter you are using can't guarantee the order, then you have to re-order the messages.  I would usually do this by inserting the messages into a database and and have a stored procedure that makes sure they are consumed in order.

    Sunday, December 15, 2019 9:31 PM
  • Well I receive message calling a API and have to send these messages individually sequentially as receive to a Web service 

    RH

    Sunday, December 15, 2019 9:39 PM
  • Then the pattern of having a single orchestration, that starts up by being triggered by a SQL polling receive location that polls the BizTalk Management database only returns 1 when there isn't an instance of the Orchestration alread running

    DECLARE @orchs2 TABLE (
    uidGUID varchar(max),
    OrchName varchar(max))
    
    INSERT INTO @orchs2
    exec [BizTalkMgmtDb]..ops_LoadOrchestrationServiceNames 
    
    SELECT CASE
      WHEN COUNT(*) > 0 THEN 0
      ELSE 1
      END
    FROM @orchs2 AS Orch2
    JOIN [BizTalkMsgBoxDb].[dbo].[Instances]  AS Orch1 with (nolock) ON Orch2.uidGUID = Orch1.uidServiceID AND Orch2.OrchName = 'Client.Solution.Orchestrations.Interface.OrchestrationName, Client.Solution.Orchestrations.Interface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxxxxxxxx'

    Then have that Orchestration have loop, where it calls the API for the next record, and send it of the the send port that has ordered delivery.    You will need to also have error handling if the message fails and suspends, as well as logic to reduce your polling of the API if it returns a status/message saying there are no more messages to process.


    Sunday, December 15, 2019 10:14 PM
  • I just though Singleton Orch (Sequential Convoy) will help in routing message uniformly in sequential order.

    Now what is use of the hitting the sql db additionally.

    You are confusing me and seems like taking long method in achieving this.

    BizTalk dont have the capability to send messages sequentially as in the order received from Web/API services?


    RH

    Sunday, December 15, 2019 10:35 PM
  • How are you starting your singleton Orchestration?

    As you cannot start an Orchestration from a Web/API that you have to call.   You could also do it via a scheduled task or schedule adapter but then how are you going to prevent there being more than one started?

    That is what I covered in my answer.   That is the purpose of the SQL receive port, to ensure that one and only one Orchestration is running that will call the Web/API to retrieve messages and send them on to your destination.



    Sunday, December 15, 2019 11:58 PM