[ https://issues.apache.org/jira/browse/AMQ-7002?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jamie goodyear updated AMQ-7002: -------------------------------- Attachment: AMQ7002-messageId.patch > Activemq SchedulerBroker doSchedule can schedule duplicate jobIds leading to > runtime exception > ----------------------------------------------------------------------------------------------- > > Key: AMQ-7002 > URL: https://issues.apache.org/jira/browse/AMQ-7002 > Project: ActiveMQ > Issue Type: Bug > Components: Broker, Job Scheduler > Affects Versions: 5.15.4 > Environment: Java 8 > AMQ 5.15.4 > Reporter: Jamie goodyear > Assignee: Gary Tully > Priority: Major > Fix For: 5.16.0 > > Attachments: AMQ7002-messageId.patch, amq7002-master.patch > > > Under load we've observed that SchedulerBroker will attempt to schedule jobs > using the same JobId. > When JobScheduleView attempts to process these jobs we'll encounter an > exception during the below put call: > {color:#bbb529}@Override{color}{color:#cc7832}public {color}TabularData > {color:#ffc66d}getAllJobs{color}() {color:#cc7832}throws {color}Exception { > OpenTypeFactory factory = > OpenTypeSupport.getFactory(Job.{color:#cc7832}class{color}){color:#cc7832};{color} > CompositeType ct = factory.getCompositeType(){color:#cc7832};{color} > TabularType tt = {color:#cc7832}new > {color}TabularType({color:#6a8759}"Scheduled Jobs"{color}{color:#cc7832}, > {color}{color:#6a8759}"Scheduled Jobs"{color}{color:#cc7832}, > {color}ct{color:#cc7832}, new {color}String[] { {color:#6a8759}"jobId" > \{color}});{color} TabularDataSupport rc = {color:#cc7832}new > {color}TabularDataSupport(tt){color:#cc7832};{color} List<Job> jobs = > {color:#cc7832}this{color}.{color:#9876aa}jobScheduler{color}.getAllJobs(){color:#cc7832};{color}{color:#cc7832} > for {color}(Job job : jobs) { > rc.put({color:#cc7832}new {color}CompositeDataSupport(ct{color:#cc7832}, > {color}factory.getFields(job))){color:#cc7832};{color} } > {color:#cc7832}return {color}rc; > \{color}} > This can be triggered by clicking on the Schduled tab in the webconsole. > The error only occurs due to duplicate JobIds. > Debugging this error, we can see that two jobs with different payloads have > the same JobId - this should not be allowed to occur. > We need to ensure that JobIds are unique. > Note: > In test scenario virtual topics are in use, with two consumers. > Redelivery plugin is also in use on the Broker. > <plugins> > <redeliveryPlugin fallbackToDeadLetter="false" > sendToDlqIfMaxRetriesExceeded="false"> > <redeliveryPolicyMap> > <redeliveryPolicyMap> > <defaultEntry> > <redeliveryPolicy backOffMultiplier="2" > initialRedeliveryDelay="60000" maximumRedeliveries="20" > maximumRedeliveryDelay="300000" useExponentialBackOff="true"/> > </defaultEntry> > </redeliveryPolicyMap> > </redeliveryPolicyMap> > </redeliveryPlugin> > </plugins> -- This message was sent by Atlassian JIRA (v7.6.3#76005)