Biztalk Ordered Delivery direct bound to multiple ports - biztalk

another ordered delivery problem.
We have an orchestration which is bound to a send port which has ordered delivery true. Another send port also picks up these messages through filtering, this port also has ordered delivery.
Now for some reason when there are multiple ports using the message and one of these is directly port binded only one of the ports is being used. I mean that not both ports give an output.
If i unenlist one of the ports it's always outputted, this works in both ways.
We used to have this with 2 ports which both used filters instead, this worked but we had to change one to a direct port, the problem occured since then. Also the choice of ports for BizTalk is pretty random, because on our server it for example chooses port A and when I recreate the same problem on my local machine it for example choses port B.
It's kind of a weird problem and we have no idea what could be the cause.

David Hall: I recreated this on my BizTalk 2010 box and never faced the problem you are mentioning! You have to set ALLOW MULTIPLE RESPONSES to True. It is under the HOSTS tab in BizTalk settings dashboard.
So, I've got 4 send ports. Each has Ordered Delivery turned ON. All send ports are on same subscription, i.e. BTS.ReceivePortName. I have an MLLP receive location for receiving the message into the Biztalk box.
Test Case: Does BizTalk maintain order ?
I sent 5 diff messages in this order 1,1,2,2,3,3,4,4,5,5. All 4 send ports sent the message out in the same order 1,1,2,2,3,3,4,4,5,5.
Result; YES it does.
Forgot to mention. Everything is running under one default host of BizTalkServerApplication.

Hi this a bug in BizTalk Messaging engine worker thread, for it doesnot execute all ordered delivery Send Ports at the same time running under the same host. At max, it runs only two ordered delivery Send port, but if you have four to five ordered delivery Send ports, then only at max two send port execute at one time. To make all the ordered delivery send port works at a time, you need to put them under different host

Did you tried to add the filter to a Port Group instead, and have all the other properties in the specific ports?

Related

Weird issue with orchestration and send port filters

I've got a weird issue which totally confused me. I have an orchestration that receives a file through Receive port and puts it to Send port with delivery notification. After that orchestration performs some other actions but my issue is with the part mentioned above. It works: I put a file to Receive location and it goes to appropriate destination folder.
But, if I assign to the Send port a filter that uses fields promoted in message and filter's expression is False it still works - I receive file in destination folder (however filter is False and Send port should not process this file). And once filter becomes True I receive...THREE equal files in destination folder!
Are there any logs that I can go through to try to figure out where these two extra files come from?
Even when you add a filter to a send port, if the Orchestration is bound to the send port, it will still send through that send port, regardless what other filters you put on it.
In the Admin Console you do a query for Subscriptions and find the send port, you will notice that it will have an OR condition with http://schemas.microsoft.com/BizTalk/2003/system-properties.SPTransportID == {GUID} and that is the filter that is used when a an Orchestration sends to a bound send port.
So check what the filter looks like for your send port. Also check to see if you have a send port group set up that includes that send port, as that would also cause a message to be sent to that send port if the filter on that matches.
What is probably happening is that the Orchestration is sending one, and the filter is matching the message received from the Receive Location. You will have to do some more digging to see why the third message.

Is it possible to restrict ForceBindIP to only inbound/outbound traffic?

I'm using ForcebindIP to point an app at a specific network adapter, like this:
forcebindip -i 192.168.0.5 MyCSharpApp.exe
This works fine and the app isn't aware (or doesn't access) any of the other network adapters on the PC.
Is it possible to restrict ForceBindIP to outbound traffic only leaving the app to receive data from any local network adapter? Or even to specify a network adapter for outbound and another for inbound traffic?
I can't find an extra startup parameter for ForceBindIP that does this.
I'd appreciate any help with this.
If I get your problem correctly, you want to bind your application to listen for packets on all available interfaces but return packets to only through one given interface. I also assume it's a server application and you don't have neiter source code nor control over its behaviour.
Disclosure: I do not know how ForceBindIP works internally, I'm basing my understanding of it on this passage from the website:
it will then inject a DLL (BindIP.dll) which loads WS2_32.DLL into memory and intercepts the bind(), connect(), sendto(), WSAConnect() and WSASendTo() functions, redirecting them to code in the DLL which verifies which interface they will be bound to and if not the one specified, (re)binds the socket
Problems to overcome
I don't believe your desired configuration is possible with just one application level DLL injector. I'll list a few issues that ForceBindIP will have to overcome to make it work:
to listen to a socket, application has to bind() it to a unique protocol-address-port combination first. An application can bind itself to either a specific address or a wildcard (i.e. listen on all interfaces). Apparently, one can bind to wildcard and specific address simultaneously as outlined in this SO question. This however will be two different sockets from the application standpoint. Therefore your application will have to know how to handle this sort of traffic.
When accepting client connection, accept() will create a new socket and parameters on that are managed by Windows, I don't believe there's an API to intercept binding here - by this time the connection is considered established.
Now imagine, we somehow got a magic socket. We can receive packets on one interface and send to another. The client (and all routing equipment on the way) will have to be aware that two packets originating from two different source IP addresses are actually part of the same connection and be able to assemble the TCP session (or correctly merge UDP streams).
You can have multiple gefault gateways with different priorities and rules (which is a whole different topic to explore) but as far as I'm aware that's not going to solve your particular issue: majority of routing protocols assume links are symmetric and expect packets to keep within same interface. There are special cases like asymmetric routing and network interface teaming but they have to be implemented on per-interface level.
One potential solution
One way to achieve what you're after (I don't know enough about your environment to claim it will work), will be to create a virtual interface, set it into yet another IP network, bind your application to it, then use firewall (to, say, allow multicast backets into the "virtual" network) and routing from that network to required default gateway with metric set to 1. I also suspect just any Windows will not be that flexible, so you might need like a Server Edition.
I am sorry this didn't turn out to be the ready-to-fly solution, I however am hoping this gives you more context to the problem you are facing and points you into other directions to explore.
You can use Set-NetAdapterAdvancedProperty command in Powershell to set the flow control of your specified adapter
To get the names and properties of all the network adapter :-
Get-NetAdapterAdvancedProperty -Name "*"
Suppose you want the network adapter named "Ethernet 2" to be only used to receive data from internet then type :-
Set-NetAdapterAdvancedProperty -Name "Ethernet 2" -DisplayName "Flow Control" -DisplayValue "Rx Enabled"
You can find more in :
https://learn.microsoft.com/en-us/powershell/module/netadapter/set-netadapteradvancedproperty?view=win10-ps
Microsoft winsock example has a usage in their example for limiting a socket to only send or receive mode. It might help.
https://learn.microsoft.com/en-us/windows/win32/winsock/complete-client-code
Outbount and Inbount limits are not imposed while binding. But latter or when connection is established.
Line of code pertaining to this in client code is toward the end.
// shutdown the connection since no more data will be sent
iResult = shutdown(ConnectSocket, SD_SEND);

retrieve dynamically assigned tcp port from akka.net remote

My job is to write a distributed client/server application with some concurrent tasks. So i decided to use akka.net for the concurrency issues. To implement the ipc between server and client akka remote is used. For some reasons there may run more than one client of the same type on a workstation. So i configured these clients for dynamic assignment of a tcp port. This worked fine for sending messages to the server.
My problem is to push some information to the clients. To accomplish this task an actor on the client exist. Now the server creates a reference for this actor. Therefor it needs the port the client is listening on . My idea is to send the tcp port the client uses to the server in some sort of connection procedure using a actor on the server.
After searching for some hours I didn't find any hint where to find the dynamically assigned tcp port. So how would the client get the assigned tcp port?
Ok, I could use akka.cluster. But using akka.cluster is breaking a fly on the wheel, I think. And if it solves my issue reamins to be seen.
Two suggestions, assuming that it is your client that makes the first contact with the server.
I'd have the server keep track of which clients are connected. I'd probably have a heartbeat message that gets sent once every few seconds from each client system. This way you can store an IActorRef for each alive client and send messages back without the need for finding the port. IActorRefs are preferable wherever possible for location transparency.
If you actually need to explicitly find the port, you may be able to extract it from the Path property of the IActorRef of one of the actors on the client system.
Thanks to patricks suggestions my issue is solved.
The solution is to extract the needed information from the senders path available while executing the hello message. With this information the server is able to maintain a list of all connected clients and theire network address.
Thanks a lot # patrick.
Regards Gregor

Why BizTalk server is not supporting more than one send location for one send port?

In BizTalk server we can configure many receive locations for one receive port . In the same way if I want to send the same message to many destinations I have to create a send group containing the collection of send ports which will send the message to my desired locations . This is fine I have understood the concept of send group . But why one send port is not supporting more than one send location ??
But why one send port is not supporting more than one send location
I guess the main reason for this is "Because it is what it is". The difference between send port groups with multiple ports, and recieve ports with mutliple locations is mainly semantics, rather than any technical difference.
However, in the interests of argument, I could argue that a send port, which is by it's nature a subscriber in BizTalk, should only do a single thing. In this case that thing is to send to one transport channel (and one backup channel). If you introduced multiple "send locations" then the send port would be responsible for more than one thing.
Furthermore, the introduction of send locations would introduce complexity:
what send locations would be invoked to send the message? Would it be the same each time?
how to handle a mixture of synchronous and asynchronous transports on a single send port?
etc...

Constantly reading/writing data over a TCP/IP Port. Which one?

Unfortunately I don't know much networks. I am writing a program that has two versions. A server version and a client version. Lets assume that the client versions are installed on, say 20 PCs that are connected to the server over ethernet. The client versions needs to CONSTANTLY get some data from the server. The data is kind of serial. I wanted to know a way to broadcast the data that gets updated every second and make it available to all the other PCs in the network. Could I use the HTTP Port for this?, like writing the data to an HTML page or something? or Is there a better port or method for doing this?
Any ideas will be greatly appreciated.
This sounds like a pretty straightforward application of TCP sockets. The server would be set up to "listen" on a particular port (you pick the port number, say 12345), and each client would make a TCP connection to the server on that port.
Whenever the server has data to send, it would send it once to each connected client. This could mean that the server sends the data up to 20 times on different sockets, but that's fine. The client would read the data from its connected socket to the server.
There are other alternatives, such as UDP or even UDP multicast, but these usually end up being a lot more complicated because UDP doesn't guarantee that packets always arrive at the destination (and they may even be duplicated or out of order). TCP ensures that the data you send either arrives complete in the correct order, or doesn't arrive at all (in that case the connection would be dropped).
An example of this sort of multiple TCP connection is VNC:
VNC is widely used in educational contexts, for example to allow a distributed group of students simultaneously to view a computer screen being manipulated by an instructor, or to allow the instructor to take control of the students' computers to provide assistance.
There are many ways. you can choose any of them but i think, document below will help you a lot.
Multicast over TCP/IP HOWTO:
http://www.ibiblio.org/pub/Linux/docs/howto/other-formats/html_single/Multicast-HOWTO.html#sect-trans-prots

Resources