Hi,
We have a requirement where up to 300,000 messages per hour can be sent to a
queue and these messages need to be both
1. Validated and saved to a sql server 2005 database
2. Translated to a different format and put onto another queue
Due to the large throughput requirment we will have a windows service which
will start up a number of threads to read and process the messages from the
queue. What I need to deal with though is handling failures, if we get a
problem anywhere then we need to rollback and put the message back into the
receive queue.
Failures could occur reading from the queue, writing to the database (via a
number of stored procedures) or writing to the send queue.
I see that I can make my receive queue transactional, but am worried about
the performance impact and how this would work exactly in a multi-threaded
environment since if I understand what I read correctly the message won't
disappear from my receive queue until I commit, so would each of my threads
potentially pick up the same message?
If they could pick up the same message, would synchronization using the Lock
keyword solve this, if so. would this be a good idea or is there something
better ?
We are using .Net 2.0 Any thoughts or suggestions would be really helpful.
Thanks