MSMQ作为SQL Server插入的缓冲区 [英] MSMQ as buffer for SQL Server Inserts

查看:95
本文介绍了MSMQ作为SQL Server插入的缓冲区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习MSMQ,并成功地使用它来将来自面向消费者的ASP.NET MVC网站的电子邮件和文本排队,并由单独的客户端应用程序处理.

I'm learning about MSMQ and am successfully using it to queue email and text messages from a consumer-facing ASP.NET MVC website, to be handled by a separate client application.

如果缺少SQL Server数据库,也许在交换驱动器或破坏数据库部署时,将非时间紧迫的插入队列在本地MSMQ队列中以提高正常运行时间有意义吗?

In the event of a missing SQL Server database, perhaps while swapping drives or a broken database deploy, would it make sense to queue non time-critical inserts in a local MSMQ queue to improve up-time?

从理论上讲,我可以在进行数据库更改时暂停/恢复队列处理(持久性).有人尝试过此方法吗?还是有更好的方法?

Theoretically, I can then pause/resume queue processing (persistence) while making database changes. Has anyone tried this or is there a better way?

推荐答案

我当时在为保证交付而实施此团队.我们使用MSMQ将插入请求转发到数据库服务器,该数据库服务器正在运行自己的服务,该服务使请求出队并运行插入,然后确认消息(以确保传递).它已经运行了一年多了,我们从未被要求弄清楚为什么它不起作用……对我来说似乎很扎实.

I was on a team that implemented this for purposes of guaranteed delivery. We used MSMQ to forward the insert requests to the database server, which had its own service running that dequeued the requests and ran the inserts, then acknowledged the message (to ensure delivery). It's been running for over a year now, and we've never been asked to come figure out why it isn't working...seems pretty solid to me.

这篇关于MSMQ作为SQL Server插入的缓冲区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆