Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 126119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T05:16:01+00:00 2026-05-11T05:16:01+00:00

I am currently building two windows services: The first takes messages from an internet

  • 0

I am currently building two windows services:

  • The first takes messages from an internet connection and inserts these into a database. This is designed to be fast and stable and not do any other processing

  • The second performs a batch process with any new messages that have arrived since it last ran.

I am trying to think of a way so that the second service will only run its batch process when new messages are ready to be processed and if the second service errors the first service will keep going and vice versa. At the moment it uses a loop every 5 seconds.

I am currently thinking of using a message queue, where the first service writes a message only if the queue is empty, and the second service will see if the queue contains any messages, if not go into an asynchronous wait until a message arrives and then remove the message and run. Therefore using the queue not really as a queue but as a binary switch that when it’s state changes causes an event to be triggered to the second service.

I presume there is a better way to do this that I have not encountered could someone please point me in the right direction?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T05:16:02+00:00Added an answer on May 11, 2026 at 5:16 am

    Actually, your way is EXACTLY how I would implement this for these results. With MSMQ, you don’t have to check to see if you have a message written to the queue, the first service just writes to the queue, and the second service just reads from it to process it (when it is active).

    The beauty of using MSMQ is that one or the other service can be down, but the queues will be up, so you can continue processing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently building a measurement unit convertion app for Windows Phone. After setting
I'm building a class or two based on StdRegProv to handle Windows Registry via
I'm currently building the damage mechanic for my game. Two classes handle this, the
Currently I'm building an windows application using sqlite. In the data base there is
I'm am currently building two custom validators that extends Zend_Validate_Abstract which are named respectively
I'm currently building my first Rails 3 app, but can't quite figure out how
For a system I am currently building, the following two scenarios occur: My permissions
I have a method that I am currently building to compare two lists of
I am currently building a web application that will be using two databases at
I am currently building an Android app where I will have to maintain two

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.