sqlbroker将tcp测试路由到同一服务器
出于测试目的,我将两个数据库放置在同一台服务器上,我想通过 TCP(而不是 GUID)在数据库之间发送排队消息。我是否仍然需要一个端点,因为它全部位于一台服务器上?我还使用 tcp://127.0.0.1:PORT 或 tcp://IP:port 吗?
最后,路由中的ReceivingService是目标数据库上的服务还是启动数据库上的服务?提前致谢!
CREATE ROUTE Route_to_Target_Database_On_Same_Server
WITH
BROKER_INSTANCE = '111F27B6-1211-10E1-1711-B1D19113121111',
SERVICE_NAME = 'ReceivingService',
ADDRESS = 'TCP://127.0.0.1:2044'
CREATE ENDPOINT BrokerEndpoint
STATE = STARTED
AS TCP ( LISTENER_PORT = 2044 )
FOR SERVICE_BROKER (
ENCRYPTION = DISABLED);
For testing purposes, I placed two databases on the same server, I want to send queued messages between databases via TCP (not GUID.) Would I still need an endpoint since its all on 1 server? Also do I use tcp://127.0.0.1:PORT or tcp://IP:port?
Lastly is the ReceivingService in the route the service on the target database or the service on the initiating database? Thanks in advance!
CREATE ROUTE Route_to_Target_Database_On_Same_Server
WITH
BROKER_INSTANCE = '111F27B6-1211-10E1-1711-B1D19113121111',
SERVICE_NAME = 'ReceivingService',
ADDRESS = 'TCP://127.0.0.1:2044'
CREATE ENDPOINT BrokerEndpoint
STATE = STARTED
AS TCP ( LISTENER_PORT = 2044 )
FOR SERVICE_BROKER (
ENCRYPTION = DISABLED);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想通了。两者都有效。只需要小心防火墙/关闭的端口,并且两台机器上的权限都是正确的。如果在同一服务器上,则不需要端点,但如果其远程,则必须有端点(两者都具有正确的用户权限)
I figured it out. Both work. Just have to becarefull of firewalls/closed ports and permissions are correct on both machines. No need for endpoints if on same server, but if its remote then endpoints are a must (with correct user permissions on both)