Duplex One Way Submit + Multi-Threading

Topics: Developer Forum, User Forum
Mar 1, 2007 at 9:48 PM
I'm thinking of using the TCP Adapter for a project that requires multiple threads on one machine to connect to BizTalk... all on the same port.

Is this possible with your adapter?

In reading your documentation I get the impression that it would only truly work with one thread from on one machine talking to BizTalk.
Mar 2, 2007 at 9:12 PM
What is you message exchange pattern ?
Can you describe a bit more about the way that the sending app works ?
Mar 2, 2007 at 9:34 PM
I have pooled objects on multiple machines that will be sending requests to BizTalk using sockets.

I would like BizTalk to send back an acknowledgement for each request... using the same socket connection that transported the request... to the originating piece of code.

This concept is further complicated by the fact that we will probably have a load balancer between the calling machines and BizTalk in the future... which means that to BizTalk all of the originating machines will have the same IP.
Mar 5, 2007 at 8:53 AM
Your scenario should work if it were not for the last statement you mentioned about the load balancer. The Adapter does not support multiple Party's in duplex mode for the same IP Address (which would be your load balancer)

As far as multiple threads, the adapter should work in this scenario
Mar 5, 2007 at 5:08 PM
I don't understand how the adapter would work with multiple threads using multiple socket connections to BizTalk.

I'm probably making a wrong assumption but hopefully you can help clarify things a bit.

1. I have a receive location which uses the TCP adapter. (Properties: Is Duplex = true, Port = 1968).

2. I have an orchestration which subscribes to messages received by that receive location.

3. I want to send the MessageID back to the originating code as an acknowledgement.

4. I have my send port using the TCP adapter . (Properties: Supports Duplex = true, BizTalk Party = a party associated with my sending machine).

If my sending machine sends 5 requests at the exact same time... how does each send port instance know which connection to send back on... all 5 are associated with the same IP through the BizTalk Party?

Mar 6, 2007 at 10:23 PM
Yes, the Send Port is configured with a Part Alias.

1. Create a Rcv Location configured with Duplex property set and your start/end frame, port etc
2. Setup a Party called TestParty
3. Create a ComputerAddress with DnsName=<MachineName> (this is the address that the receive adapter socket is getting from the network socket, so you must use this in the Party Configuration)
4. Create a ComputerAddress with IPAddress of nnn.nnn.nnn.nnn - This is optional and must match the name resolution for the machine in 3 above - ie the sending & receiving machine
5. Ensure your sendport is configured to use a Party of TestParty (which you configured in Step 1) and also set to Duplex
6. MUST RESTART HOST INSTANCE FOR THE TCP ADAPTER. (Outstanding issue to call BTExplorer Object model Refresh() on config changes)

As messages are received on the socket, a DuplexWorkerThread is dispatched by the listener to process the request