Editorials

Message Queues in SQL

I have written here on SSWUG a few times with tips or articles about how to use SQL Server tables as a queue. It’s rather simple to do and quite effective. Today I wanted to ask a few questions about this practice.

There are some alternatives available today that you could use for queuing instead. For example, you could use Microsoft Message Queue (MSMQ) which is available as a service you can start in most Windows versions. I haven’t checked Windows 8.#.

One of the things you want to make sure of with message queuing is that if the service stops, when it restarts it is able to remember the previous state so that messages previously in the queue are still there until processed. One way MSMQ can do this is by having SQL Server as a backend.

So, what really is the point of using MSMQ if the data is still in SQL Server in the first place? Have you really gained anything? Would it be more efficient to simply use SQL Server natively rather than generically from MSMQ?

What do you think? Clearly MSMQ isn’t the only queuing software available. Is there something you recommend instead? Get into the conversation. Leave your comments here, or drop an email to btaylor@sswug.org.

Cheers,

Ben