Book Image

MASTERING NSERVICEBUS AND PERSISTENCE

By : Richard L Helton
Book Image

MASTERING NSERVICEBUS AND PERSISTENCE

By: Richard L Helton

Overview of this book

Table of Contents (15 chapters)
Mastering NServiceBus and Persistence
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The PayQueue sample


From these frameworks and the use of SQL Queuing, we will be introducing a PayQueue sample that will be evolving over some of the following chapters.

The solution will start with four projects:

  • MyMessages: This contains the common messages—currently EventMessage given previously

  • AppForWritingXML: This contains the application to write XML messages to disk

  • AppForWritingTables: This contains Entity Framework and C# refection to populate the PayQueue Payments table with the event message data

  • AppForReadingXML: This reads the sample XML files from disk, populates the Payments table, and sends the data through a SQL Queue

Many of the snippets have already been covered in part. The part that remains is sending it across the bus in SQL Queuing. We set the logging (log4net in this case), configure the bus, and send the message.

The installation piece creates the endpoints in SQL Server, and it knows to do this because the transport is set to <SqlServer>:

          // Set the...