Solved

windows service,file wather,msmq

Posted on 2014-02-25
2
292 Views
Last Modified: 2014-06-05
Requirement,

Client will put the file in shared folder for order creation,the file will be as xml file which contains
multiple order(100 + order).everyday we will get the multiple files for order.

we have to read the xml file ,fetch the order and according to order send mail to user.
i am trying to do it with windows service,to read the xml file and send mail to user.

issue :1. like in middle file reading and sending mail,if error comes than
 how we could know that how many successful record we have send via mail?suppose that
 i am having 100 records in 1 order file after reading 50 record errro comes
then could we know that from which record we need to send email to user(how do i excecute file again).

2.after completion of successful read moved that file to Archive folder.I am ok with that i can do it.

some solution which i know as below.
1.take one database,insert data to it from flat file than process record from database with some successful flag,but client is not providing
a database.
2.some one told that use file watcher and msmq,i dont know how to use both things in windows service to implement it.i have not worked on msmq.


overall requirement

xmlfile---->read data from windows service will execute in 5 min ----send mail to user

problem: if error comes in middle of that how we take the latest record from xml file?

could you please provide the better approaches for this requirement?code/Article ?it will help to
to make some small poc before execution
0
Comment
Question by:nicemanish
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 25

Accepted Solution

by:
apeter earned 500 total points
ID: 39890507
Once the file watcher tries, open the xml file and start reading one order at a time and try to process it. If it is success send a success mail or failure email and continue reading the order. Why you need msmq or db for this ?
0
 

Author Comment

by:nicemanish
ID: 40113863
good
0

Featured Post

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question