activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bo Xu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMQ-5069) scheduled delivery not work when persistent="false" schedulerSupport="true"
Date Fri, 21 Feb 2014 17:45:19 GMT

    [ https://issues.apache.org/jira/browse/AMQ-5069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13908559#comment-13908559
] 

Bo Xu commented on AMQ-5069:
----------------------------

Tim, thanks for comment. 
1. from users' view point, persistent and scheduled-delivery are totally different things.
one should not impact the other.
2. in older version, like 5.6, with non-persistent, scheduled-delivery works fine.
3. We deployed in production, with non-persistent (for performance) and scheduled-delivery
for consumer-retry. This bug broke our production, I have to deploy modified broker 5.9.
4. it looks like in 5.10, with the configurable jobSchedulerStore, this bug should be gone.
it is great! 
 

> scheduled delivery not work when persistent="false"  schedulerSupport="true"
> ----------------------------------------------------------------------------
>
>                 Key: AMQ-5069
>                 URL: https://issues.apache.org/jira/browse/AMQ-5069
>             Project: ActiveMQ
>          Issue Type: Wish
>          Components: Broker
>    Affects Versions: 5.9.0
>            Reporter: Bo Xu
>
> with version 5.9, when configured in activemq.xml with: persistent="false"  schedulerSupport="true",
scheduled delivery does NOT work. The message is immediately ready for delivery, 
> Here is my fix, please review it and make it official.
>  
> diff ../activemq-parent-5.9.0/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java
My_BrokerService.java 
> 647c647
> <         LOG.info("Apache ActiveMQ {} ({}, {}) is starting", new Object[]{ getBrokerVersion(),
getBrokerName(), brokerId });
> ---
> >         LOG.info("Modified Apache ActiveMQ {} ({}, {}) is starting", new Object[]{
getBrokerVersion(), getBrokerName(), brokerId });
> 1806c1806,1807
> <         if (!isSchedulerSupport()) {
> ---
> >         //if (!isSchedulerSupport()) @BOXU: always true, if !isPersistent()
> >         if (!this.schedulerSupport) {
> 1814,1816c1815
> <             if (!isPersistent()) {
> <                 return null;
> <             }
> ---
> >             if (isPersistent()) {
> 1818,1821c1817,1835
> <             try {
> <                 PersistenceAdapter pa = getPersistenceAdapter();
> <                 if (pa != null && pa instanceof JobSchedulerStore) {
> <                     this.jobSchedulerStore = (JobSchedulerStore) pa;
> ---
> >                 try {
> >                     PersistenceAdapter pa = getPersistenceAdapter();
> >                     if (pa != null && pa instanceof JobSchedulerStore) {
> >                         this.jobSchedulerStore = (JobSchedulerStore) pa;
> >                         configureService(jobSchedulerStore);
> >                         return this.jobSchedulerStore;
> >                     }
> >                     //else return null;
> >                 } catch (IOException e) {
> >                     throw new RuntimeException(e);
> >                 }
> >                                               } 
> >             else {
> >                 LOG.info("Creating user configured jobSchedulerStore, fixed by BOXU,
Paypal");
> >     
> >                 try {
> >                     String clazz = "org.apache.activemq.store.kahadb.scheduler.JobSchedulerStoreImpl";
> >                     jobSchedulerStore = (JobSchedulerStore) getClass().getClassLoader().loadClass(clazz).newInstance();
> >                     jobSchedulerStore.setDirectory(getSchedulerDirectoryFile());
> 1823c1837,1840
> <                     return this.jobSchedulerStore;
> ---
> >                     jobSchedulerStore.start();
> >                     LOG.info("JobScheduler using directory: {}", getSchedulerDirectoryFile());
> >                 } catch (Exception e) {
> >                     throw new RuntimeException(e);
> 1825,1837d1841
> <             } catch (IOException e) {
> <                 throw new RuntimeException(e);
> <             }
> < 
> <             try {
> <                 String clazz = "org.apache.activemq.store.kahadb.scheduler.JobSchedulerStoreImpl";
> <                 jobSchedulerStore = (JobSchedulerStore) getClass().getClassLoader().loadClass(clazz).newInstance();
> <                 jobSchedulerStore.setDirectory(getSchedulerDirectoryFile());
> <                 configureService(jobSchedulerStore);
> <                 jobSchedulerStore.start();
> <                 LOG.info("JobScheduler using directory: {}", getSchedulerDirectoryFile());
> <             } catch (Exception e) {
> <                 throw new RuntimeException(e);



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message