I need to enable the service broker on a database which is already in an availability group. From the ms office page: https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/service-broker-with-always-on-availability-groups-sql-server?view=sql-server-2016.
step 1 shows: Ensure that the availability group possesses a listener.
There is already a listener in my AG before the service broker setup. My question is 'Do the service broker need a separate listener to be setup just for its own? or using the existing listener is ok'.
step 2: Ensure that the Service Broker endpoint exists and is correctly configured.
CREATE ENDPOINT [SSBEndpoint]
STATE = STARTED
AS TCP (LISTENER_PORT = 4022, LISTENER_IP = ALL )
FOR SERVICE_BROKER (AUTHENTICATION = WINDOWS)
My service broker app is going to use a specified login username which granted as db_owner under the database. In this case, should (AUTHENTICATION = WINDOWS) looks like something like (AUTHENTICATION = <username>)?correct me wrong or not.
to create routing in msdb, the document shows an example code
CREATE ROUTE [RouteToTargetService] WITH
SERVICE_NAME = 'ISBNLookupRequestService',
ADDRESS = 'TCP://MyAgListener:4022';
does the 'MyAgListener' refers to my old listener? or i need to create a separate listener just for service broker and 'TCP://MyAgListener:4022' should refer to my new service broker listener which needs to created.
I am a bit confused. Could you please so kind to clarify.