Queue in OneWay WCF messages using Windows service and SQL Server

I need to implement a queue mechanism for WCF service requests. The service will be called by customers unilaterally. These query messages must be stored in the SQL Server database, and the Windows service pauses the messages. The time at which requests are processed will be configured. If an error has occurred in processing the message, it must be repeated up to 100 times, and if it still fails, it must be stopped.

There should also be a mechanism to monitor the number of transactions made per day and the number of failures.

QUESTIONS

  • If I used MSMQ, clients could forward the message to the queue without knowing the service endpoint. But I use SQL Server to store query messages. How can clients send queries to SQL Server?

  • Is a solution possible? We have an article / book that explains how to implement the above?

  • What are the steps to prevent the service and client from reaching the error state in this scenario?

  • What is the best way to store an incoming message in a database?

  • What is the best way to implement a replay mechanism? Something already exists, so I don’t need to reinvent the wheel?

  • Is there any book / article explaining this implementation?


NOTES

  • The content of the message will be complex XML. For example, expenses for employee expenses or a list of employees.

READING

  1. Writing a WCF Request to the Database

  2. WCF

  3. MSMQ SQL Server Service Broker

  4. WCF ?

  5. WCF 4 -

  6. https://softwareengineering.stackexchange.com/questions/134605/designing-a-scalable-and-robust-retry-mechanism

  7. SQL Service Broker NServiceBus

  8. NServiceBus?

+2
4

- , , :

  • SQL 2005+, Service Broker , . , MSMQ. , ( , ) , . , - " ", , .
  • :
    • ,
    • ,
    • , ,

, . Service Broker ; 5 , , . - , ( ).

+3

1. MSMQ, , .

, MSMQ, .....

SQL Server . SQL Server?

SQL Server - , . , SQL Server.

2. ? - /, , ?

, . , : ? - ?

3. , ?

- , , SOAP .NET.

+2

, :

enter image description here

netMsmqBinding .

, , . , , .

dequeue , . .

, , .

+2

. , , NServiceBus. , . .

.

NServiceBus . , NServiceBus, MSMQ, WCF, , .

- SQL Server, Windows .

, NServiceBus , , , . : .

.

NServiceBus . - Bus.Send(msg). "" , . Bus.Defer(DateTime.Now.AddDays(1), msg); , NserviceBus , .

, 100 , , .

NServiceBus , . , . NServiceBus . 5. , , , , , 100. NServiceBus , . , , , - , , . , , .

, .

MSMQ , . , , . NServiceBus , , , , . , , , .

One of the main functions of NServiceBus is reliability. WCF will do so much for you, and then you yourself. This is a lot of code, complexity and frankly extremely error prone. All I described here are all the standard NServiceBus functions, and I barely scratched the surface with everything else that you can do with it. I recommend you check this out.

+1
source

All Articles