Vertx.io Scheduling Tasks2019 Community Moderator ElectionJava library class to handle scheduled execution of “callbacks”?Schedule method invocation C#Oracle scheduled tasks?Scheduling a time in the future to send an email in Java or PythonScheduling a dynamic asp.net function?What's the easiest way to schedule a function to run at a specific time using C#Java enterprise architecture for delegating tasks between applicationsEmail Scheduler in C# using WCFIstio request tracing for vert.x event bus messagesVertx Websocket: Load Balancing

How to get the n-th line after a grepped one?

Is honey really a supersaturated solution? Does heating to un-crystalize redissolve it or melt it?

This word with a lot of past tenses

Have the tides ever turned twice on any open problem?

How to explain that I do not want to visit a country due to personal safety concern?

Is a party consisting of only a bard, a cleric, and a warlock functional long-term?

ERC721: How to get the owned tokens of an address

Why is a white electrical wire connected to 2 black wires?

Bacteria contamination inside a thermos bottle

The German vowel “a” changes to the English “i”

Instead of a Universal Basic Income program, why not implement a "Universal Basic Needs" program?

Happy pi day, everyone!

Simplify an interface for flexibly applying rules to periods of time

About the actual radiative impact of greenhouse gas emission over time

Examples of transfinite towers

Different outputs for `w`, `who`, `whoami` and `id`

What is the adequate fee for a reveal operation?

How difficult is it to simply disable/disengage the MCAS on Boeing 737 Max 8 & 9 Aircraft?

I am confused as to how the inverse of a certain function is found.

Bach's Toccata and Fugue in D minor breaks the "no parallel octaves" rule?

How do you talk to someone whose loved one is dying?

Most cost effective thermostat setting: consistent temperature vs. lowest temperature possible

How to terminate ping <dest> &

Is it good practice to use Linear Least-Squares with SMA?



Vertx.io Scheduling Tasks



2019 Community Moderator ElectionJava library class to handle scheduled execution of “callbacks”?Schedule method invocation C#Oracle scheduled tasks?Scheduling a time in the future to send an email in Java or PythonScheduling a dynamic asp.net function?What's the easiest way to schedule a function to run at a specific time using C#Java enterprise architecture for delegating tasks between applicationsEmail Scheduler in C# using WCFIstio request tracing for vert.x event bus messagesVertx Websocket: Load Balancing










1















There is a system at a company I just started working for. The system allows clients to manage their subscriber notifications via SMS. Users log in via a web application and create messages (each message has a send date_time, destination phone_number etc). These messages are saved in a mysql database. They also have a java application implemented using jsvc. This application keeps reading the database 24/7 every 1 minute and sending the messages (via an external network provider API), that is for very message that should be sent at that particular time.



I've been brought in to rewrite the whole thing. Currently I can't change anything that deals with the web application and the database. I'm only trying to rewrite the jsvc using vertx.



I already have already written vertx service that communicates with the db and another service that communicates with the external API.



I have thought of creating a periodic function that runs every hour (it reads the database and gets all the messages that should be sent within the next one hour) and then schedules this messages to be sent to the service that communicates with external API.



My question is, how would I achieve such scheduling? The send date_time of each message is precise to the minute in the database. I'm looking at Chime and how to incorporate it but I haven't seen a good example to help me know the proper way to do it.



So, what is the proper way to use Chime to schedule eventbus messages to the external API service and is there another way I can structure this use case?










share|improve this question


























    1















    There is a system at a company I just started working for. The system allows clients to manage their subscriber notifications via SMS. Users log in via a web application and create messages (each message has a send date_time, destination phone_number etc). These messages are saved in a mysql database. They also have a java application implemented using jsvc. This application keeps reading the database 24/7 every 1 minute and sending the messages (via an external network provider API), that is for very message that should be sent at that particular time.



    I've been brought in to rewrite the whole thing. Currently I can't change anything that deals with the web application and the database. I'm only trying to rewrite the jsvc using vertx.



    I already have already written vertx service that communicates with the db and another service that communicates with the external API.



    I have thought of creating a periodic function that runs every hour (it reads the database and gets all the messages that should be sent within the next one hour) and then schedules this messages to be sent to the service that communicates with external API.



    My question is, how would I achieve such scheduling? The send date_time of each message is precise to the minute in the database. I'm looking at Chime and how to incorporate it but I haven't seen a good example to help me know the proper way to do it.



    So, what is the proper way to use Chime to schedule eventbus messages to the external API service and is there another way I can structure this use case?










    share|improve this question
























      1












      1








      1








      There is a system at a company I just started working for. The system allows clients to manage their subscriber notifications via SMS. Users log in via a web application and create messages (each message has a send date_time, destination phone_number etc). These messages are saved in a mysql database. They also have a java application implemented using jsvc. This application keeps reading the database 24/7 every 1 minute and sending the messages (via an external network provider API), that is for very message that should be sent at that particular time.



      I've been brought in to rewrite the whole thing. Currently I can't change anything that deals with the web application and the database. I'm only trying to rewrite the jsvc using vertx.



      I already have already written vertx service that communicates with the db and another service that communicates with the external API.



      I have thought of creating a periodic function that runs every hour (it reads the database and gets all the messages that should be sent within the next one hour) and then schedules this messages to be sent to the service that communicates with external API.



      My question is, how would I achieve such scheduling? The send date_time of each message is precise to the minute in the database. I'm looking at Chime and how to incorporate it but I haven't seen a good example to help me know the proper way to do it.



      So, what is the proper way to use Chime to schedule eventbus messages to the external API service and is there another way I can structure this use case?










      share|improve this question














      There is a system at a company I just started working for. The system allows clients to manage their subscriber notifications via SMS. Users log in via a web application and create messages (each message has a send date_time, destination phone_number etc). These messages are saved in a mysql database. They also have a java application implemented using jsvc. This application keeps reading the database 24/7 every 1 minute and sending the messages (via an external network provider API), that is for very message that should be sent at that particular time.



      I've been brought in to rewrite the whole thing. Currently I can't change anything that deals with the web application and the database. I'm only trying to rewrite the jsvc using vertx.



      I already have already written vertx service that communicates with the db and another service that communicates with the external API.



      I have thought of creating a periodic function that runs every hour (it reads the database and gets all the messages that should be sent within the next one hour) and then schedules this messages to be sent to the service that communicates with external API.



      My question is, how would I achieve such scheduling? The send date_time of each message is precise to the minute in the database. I'm looking at Chime and how to incorporate it but I haven't seen a good example to help me know the proper way to do it.



      So, what is the proper way to use Chime to schedule eventbus messages to the external API service and is there another way I can structure this use case?







      java scheduling vert.x






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 7 at 15:36









      ObbyObby

      388




      388






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Vert.x provides you with setPeriodic() for that.



          You can run a job every hour with something like:



          vertx.setPeriodic(1000 * 60 * 60, (l) -> 
          // Your code here
          );





          share|improve this answer























          • I'm actually using this. The problem is, when it runs, it will select all messages to be sent within the next hour from the database, remember all this messages may have different minute setting. let's say the periodic runs at 10 am, Selects all messages to be sent between 10am and 11am. Some messages may be sent immediately at 10am, others at 10.15, 10.20, 10.30, 10.45 e.t.c. Those are the ones I need to schedule within the hour

            – Obby
            Mar 9 at 10:10











          • Your period should be the minimum amount of time between messages. If you can specify something like 10:17, run this task every minute and check. If you can only specify 5ths of minutes, run this job every 5 minutes.

            – Alexey Soshin
            Mar 9 at 10:20











          • I really wanted to avoid running it every minute because not every minute will have a message. I'm currently looking at vertx-cron, will see how it goes

            – Obby
            Mar 9 at 11:19










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55047547%2fvertx-io-scheduling-tasks%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          Vert.x provides you with setPeriodic() for that.



          You can run a job every hour with something like:



          vertx.setPeriodic(1000 * 60 * 60, (l) -> 
          // Your code here
          );





          share|improve this answer























          • I'm actually using this. The problem is, when it runs, it will select all messages to be sent within the next hour from the database, remember all this messages may have different minute setting. let's say the periodic runs at 10 am, Selects all messages to be sent between 10am and 11am. Some messages may be sent immediately at 10am, others at 10.15, 10.20, 10.30, 10.45 e.t.c. Those are the ones I need to schedule within the hour

            – Obby
            Mar 9 at 10:10











          • Your period should be the minimum amount of time between messages. If you can specify something like 10:17, run this task every minute and check. If you can only specify 5ths of minutes, run this job every 5 minutes.

            – Alexey Soshin
            Mar 9 at 10:20











          • I really wanted to avoid running it every minute because not every minute will have a message. I'm currently looking at vertx-cron, will see how it goes

            – Obby
            Mar 9 at 11:19















          0














          Vert.x provides you with setPeriodic() for that.



          You can run a job every hour with something like:



          vertx.setPeriodic(1000 * 60 * 60, (l) -> 
          // Your code here
          );





          share|improve this answer























          • I'm actually using this. The problem is, when it runs, it will select all messages to be sent within the next hour from the database, remember all this messages may have different minute setting. let's say the periodic runs at 10 am, Selects all messages to be sent between 10am and 11am. Some messages may be sent immediately at 10am, others at 10.15, 10.20, 10.30, 10.45 e.t.c. Those are the ones I need to schedule within the hour

            – Obby
            Mar 9 at 10:10











          • Your period should be the minimum amount of time between messages. If you can specify something like 10:17, run this task every minute and check. If you can only specify 5ths of minutes, run this job every 5 minutes.

            – Alexey Soshin
            Mar 9 at 10:20











          • I really wanted to avoid running it every minute because not every minute will have a message. I'm currently looking at vertx-cron, will see how it goes

            – Obby
            Mar 9 at 11:19













          0












          0








          0







          Vert.x provides you with setPeriodic() for that.



          You can run a job every hour with something like:



          vertx.setPeriodic(1000 * 60 * 60, (l) -> 
          // Your code here
          );





          share|improve this answer













          Vert.x provides you with setPeriodic() for that.



          You can run a job every hour with something like:



          vertx.setPeriodic(1000 * 60 * 60, (l) -> 
          // Your code here
          );






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 8 at 9:43









          Alexey SoshinAlexey Soshin

          7,2881614




          7,2881614












          • I'm actually using this. The problem is, when it runs, it will select all messages to be sent within the next hour from the database, remember all this messages may have different minute setting. let's say the periodic runs at 10 am, Selects all messages to be sent between 10am and 11am. Some messages may be sent immediately at 10am, others at 10.15, 10.20, 10.30, 10.45 e.t.c. Those are the ones I need to schedule within the hour

            – Obby
            Mar 9 at 10:10











          • Your period should be the minimum amount of time between messages. If you can specify something like 10:17, run this task every minute and check. If you can only specify 5ths of minutes, run this job every 5 minutes.

            – Alexey Soshin
            Mar 9 at 10:20











          • I really wanted to avoid running it every minute because not every minute will have a message. I'm currently looking at vertx-cron, will see how it goes

            – Obby
            Mar 9 at 11:19

















          • I'm actually using this. The problem is, when it runs, it will select all messages to be sent within the next hour from the database, remember all this messages may have different minute setting. let's say the periodic runs at 10 am, Selects all messages to be sent between 10am and 11am. Some messages may be sent immediately at 10am, others at 10.15, 10.20, 10.30, 10.45 e.t.c. Those are the ones I need to schedule within the hour

            – Obby
            Mar 9 at 10:10











          • Your period should be the minimum amount of time between messages. If you can specify something like 10:17, run this task every minute and check. If you can only specify 5ths of minutes, run this job every 5 minutes.

            – Alexey Soshin
            Mar 9 at 10:20











          • I really wanted to avoid running it every minute because not every minute will have a message. I'm currently looking at vertx-cron, will see how it goes

            – Obby
            Mar 9 at 11:19
















          I'm actually using this. The problem is, when it runs, it will select all messages to be sent within the next hour from the database, remember all this messages may have different minute setting. let's say the periodic runs at 10 am, Selects all messages to be sent between 10am and 11am. Some messages may be sent immediately at 10am, others at 10.15, 10.20, 10.30, 10.45 e.t.c. Those are the ones I need to schedule within the hour

          – Obby
          Mar 9 at 10:10





          I'm actually using this. The problem is, when it runs, it will select all messages to be sent within the next hour from the database, remember all this messages may have different minute setting. let's say the periodic runs at 10 am, Selects all messages to be sent between 10am and 11am. Some messages may be sent immediately at 10am, others at 10.15, 10.20, 10.30, 10.45 e.t.c. Those are the ones I need to schedule within the hour

          – Obby
          Mar 9 at 10:10













          Your period should be the minimum amount of time between messages. If you can specify something like 10:17, run this task every minute and check. If you can only specify 5ths of minutes, run this job every 5 minutes.

          – Alexey Soshin
          Mar 9 at 10:20





          Your period should be the minimum amount of time between messages. If you can specify something like 10:17, run this task every minute and check. If you can only specify 5ths of minutes, run this job every 5 minutes.

          – Alexey Soshin
          Mar 9 at 10:20













          I really wanted to avoid running it every minute because not every minute will have a message. I'm currently looking at vertx-cron, will see how it goes

          – Obby
          Mar 9 at 11:19





          I really wanted to avoid running it every minute because not every minute will have a message. I'm currently looking at vertx-cron, will see how it goes

          – Obby
          Mar 9 at 11:19



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55047547%2fvertx-io-scheduling-tasks%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Identity Server 4 is not redirecting to Angular app after login2019 Community Moderator ElectionIdentity Server 4 and dockerIdentityserver implicit flow unauthorized_clientIdentityServer Hybrid Flow - Access Token is null after user successful loginIdentity Server to MVC client : Page Redirect After loginLogin with Steam OpenId(oidc-client-js)Identity Server 4+.NET Core 2.0 + IdentityIdentityServer4 post-login redirect not working in Edge browserCall to IdentityServer4 generates System.NullReferenceException: Object reference not set to an instance of an objectIdentityServer4 without HTTPS not workingHow to get Authorization code from identity server without login form

          2005 Ahvaz unrest Contents Background Causes Casualties Aftermath See also References Navigation menue"At Least 10 Are Killed by Bombs in Iran""Iran"Archived"Arab-Iranians in Iran to make April 15 'Day of Fury'"State of Mind, State of Order: Reactions to Ethnic Unrest in the Islamic Republic of Iran.10.1111/j.1754-9469.2008.00028.x"Iran hangs Arab separatists"Iran Overview from ArchivedConstitution of the Islamic Republic of Iran"Tehran puzzled by forged 'riots' letter""Iran and its minorities: Down in the second class""Iran: Handling Of Ahvaz Unrest Could End With Televised Confessions""Bombings Rock Iran Ahead of Election""Five die in Iran ethnic clashes""Iran: Need for restraint as anniversary of unrest in Khuzestan approaches"Archived"Iranian Sunni protesters killed in clashes with security forces"Archived

          Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme