locked
Forwarding ? RRS feed

  • Question

  • Hi There

    Anyone have a good resource for a forwarding example ?

    I have a distributed service broker application working but i would like to add a forwarder in the mix, all i can find in BOL is that you must create an endpoint for forwarding and create the correct routes on a frowarder but thats it.

    Is that all you require ? AN instance with a forwarding endpoint correct routes ?

    I am looking for an actual example, cannot find anything in BOL on how to actually implement it ?

    I downloaded forwarder1.1 example from getdotnet.com, but that example sucks, it does even create routes ???

    Thanx

    Thursday, July 27, 2006 1:56 PM

Answers

  • I'm not aware of any sample. But try this:

    Let II be the initiator instance, ID the initiator database which contains IS your initiator service.
    Let TI be the target instance, TD the target database which contains TS your target service.
    Let FI be the forwarding instance.

    1. Create service broker endpoints in II, FI and TI. (let's say they are tcp://ii:4022, tcp://fi:4022, tcp://ti:4022).

    2. Setup adjacent security between II and FI (certificate or windows based). Also setup adjacent security between FI and TI.

    3. Create a route in ID to service TS with address tcp://fi:4022.

    4. Create a route in TD to service IS with address tcp://fi:4022.

    5. Create a route in msdb on FI to service TS with address tcp://ti:4022.

    6. Create a route in msdb on FI to service IS with address tcp://ii:4022.

    7. Setup dialog security between IS and TS.

    At this point you should be able to use the forwarder to relay messages between IS and TS.

    Monday, July 31, 2006 6:14 PM

All replies

  • The sample shows how to implement data-dependent routing service that performs forwarding. That has nothing to do with the built-in forwarding mechansim provided by Service Broker transport.
    Thursday, July 27, 2006 5:36 PM
  • HI Rushi

    Thanx for the feedback, ok thats cool, so where do i find a good simple solid exmple of built in service broker forwarding ? There is none in BOL and i cant ind one on the net yet ?

    Thanx

    Friday, July 28, 2006 6:45 AM
  • I'm not aware of any sample. But try this:

    Let II be the initiator instance, ID the initiator database which contains IS your initiator service.
    Let TI be the target instance, TD the target database which contains TS your target service.
    Let FI be the forwarding instance.

    1. Create service broker endpoints in II, FI and TI. (let's say they are tcp://ii:4022, tcp://fi:4022, tcp://ti:4022).

    2. Setup adjacent security between II and FI (certificate or windows based). Also setup adjacent security between FI and TI.

    3. Create a route in ID to service TS with address tcp://fi:4022.

    4. Create a route in TD to service IS with address tcp://fi:4022.

    5. Create a route in msdb on FI to service TS with address tcp://ti:4022.

    6. Create a route in msdb on FI to service IS with address tcp://ii:4022.

    7. Setup dialog security between IS and TS.

    At this point you should be able to use the forwarder to relay messages between IS and TS.

    Monday, July 31, 2006 6:14 PM
  • Hi Rushi

    Thanx a million i thought no one was going to reply.

    I am setting up our service broker environment again this weekend, then i will try put a frowarder into the mix, i will post back by Monday how it went or is i had any issues.

    Thank You

    Tuesday, August 1, 2006 7:00 AM
  • Hi Rushi

    This worked great Thanx.

     

    Friday, August 11, 2006 12:01 PM
  • Hi, Rushi!
    The topologi that You describe (as I understand) is II->FI->TI. When FI is dummy and only serves as stub or gate. In my project I need to build service broker that can send one message from initiator to a few targets. Is it possible to build next topology:
                    -->   TI1
    II --> FI  -->    TI2
                    -->     TI3

    Message from II is a same to TI1/TI2/TI3.  The processing on target servers for a message is different.

    Have a suggest?

    Friday, February 9, 2007 12:37 PM