
USE BrokerDB1

-- find the broker instance name is this database
select service_broker_guid from sys.databases where name = 'BrokerDB1'
-- 6A912CA2-D1CD-4FC0-B0E5-297AB5E6821F

create route [InvService_Route2]
with
service_name = 'InvService',
-- this is the guid from the remote database
BROKER_INSTANCE = '8039CB71-4C2B-4C75-AEE3-77EDA07CFB44',
address = 'TCP://localhost:4321';
go

USE MSDB
GO

create route [InvInitiator_Route]
with
service_name = 'InvInitiator',
-- this is the guid from this side's database
BROKER_INSTANCE = '6A912CA2-D1CD-4FC0-B0E5-297AB5E6821F',
address = 'LOCAL';
go

