/[projects]/dao/DaoMqPump2/DaoMqPump2/Transport.cs
ViewVC logotype

Diff of /dao/DaoMqPump2/DaoMqPump2/Transport.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2086 by torben, Wed Nov 27 09:46:11 2013 UTC revision 2136 by torben, Wed Mar 26 14:00:14 2014 UTC
# Line 240  namespace DaoMqPump2 Line 240  namespace DaoMqPump2
240    
241          private void transportMq2Sql()          private void transportMq2Sql()
242          {          {
243                int messageCount = 0;
244    
245              MQQueueManager mqMgr = null;              MQQueueManager mqMgr = null;
246              MQQueue in_queue = null;              MQQueue in_queue = null;
247              string filename = getLogFilename(LogfileType.LogTransactions);              string filename = getLogFilename(LogfileType.LogTransactions);
# Line 306  namespace DaoMqPump2 Line 308  namespace DaoMqPump2
308                                          translog.WriteLine(getNowString() + " " + msgString);                                          translog.WriteLine(getNowString() + " " + msgString);
309                                          mqMgr.Commit();                                          mqMgr.Commit();
310                                          statusData.counter++;                                          statusData.counter++;
311    
312    
313                                            messageCount++;// increment per run message counter
314                                            if (messageCount >= 10000) // if we have moved  10000 messages in this run - let it go and give the other transports a change
315                                            {
316                                                isContinue = false;
317                                            }
318    
319    
320    
321                                      }                                      }
322                                      else                                      else
323                                      {                                      {
# Line 457  namespace DaoMqPump2 Line 469  namespace DaoMqPump2
469              return now.ToString("s");              return now.ToString("s");
470          }          }
471    
472            /* no used any where used added here for reference/ just in case */
473            private void sendErrorMail(string sub, string msg)
474            {
475                System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage();
476                message.To.Add("thn@daoas.dk");
477                message.Subject = "Error from DaoMqPump2: " + sub;
478                message.From = new System.Net.Mail.MailAddress("no-reply@daoas.dk");
479                message.Body = msg;
480    
481                System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("mail.dao.int");
482                smtp.Send(message);
483            }
484    
485          private bool validateSalt2Header(string salt2String)          private bool validateSalt2Header(string salt2String)
486          {          {
487              if (salt2String.Length < 66)              if (salt2String.Length < 66)
# Line 498  namespace DaoMqPump2 Line 523  namespace DaoMqPump2
523    
524              if (long.TryParse(afsenderTidsstempel.Trim(), out result_long) == false) // afsenderTidsstempel _skal_ være en long              if (long.TryParse(afsenderTidsstempel.Trim(), out result_long) == false) // afsenderTidsstempel _skal_ være en long
525              {              {
526                  addLogEntry("afsenderSekvensnr not a long integer, discarding");                  addLogEntry("afsenderTidsstempel not a long integer, discarding");
527                  return false;                  return false;
528              }              }
529    

Legend:
Removed from v.2086  
changed lines
  Added in v.2136

  ViewVC Help
Powered by ViewVC 1.1.20