views:

1192

answers:

2

So the model I need for my solution is as follows:

I need to poll the database and based on a result, create a request to the database for more data, get the response and pass it to a group of ports, for which based on a promoted property, only one of the ports will act.

It looks like this:

However, if you assign "Temp Out" to a send port group, the message is sent to all the ports in the group, irregardless of the filters set on each port. From my understanding, this is expected behavior (read here).

So I explored other options such as using Content Based Routing (CBR sample) like in the SDK. You can view this here.

I tried this and completely removed the orchestration (its really not needed). However, there are major routing/subscription errors, and upon further research, it appears that you can't do this if you have solicit-response ports. Some articles on that here. I pretty much have the same issue this user does.

In the end it doesn't matter to me whether I use an orchestration or not. However, I need a solution in which I can pass the message to multiple send ports, and I can have only one actually use the message and send. This is needed so that I can edit and add ports easily without having to modify anything else or hard code decisions into the orchestration.

+5  A: 

You can use Direct Binding on the orchestration's send port to inject the message back into the message box db. Using multiple port groups, each port group can then directly subscribe to the desired message type and filter on promoted properties.

ChrisLoris
In a way I found a solution. I removed the orchestration, promoted properties and on the second and third port, put filters where I defined BTS.SPName (which I thought was stored procedure name but now understand is Send Port name). The routing issues were because I hadn't fully subscribed them.
achinda99
A: 

I found that the CBR example model does indeed work. The problem with routing were the subscriptions. If I was to subscribe a send port to a solicit-response port, I had to set the BTS.SPName (Send Port Name) filter instead of the BTS.ReceivePort filter. By doing this, the message was correctly filter through. You're answer would have worked too, but it requires using an orchestration which I was trying to avoid.

achinda99