You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Gary Tully (JIRA)" <ji...@apache.org> on 2018/06/26 14:29:00 UTC

[jira] [Commented] (AMQ-7002) Activemq SchedulerBroker doSchedule can schedule duplicate jobIds leading to runtime exception

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

Gary Tully commented on AMQ-7002:
---------------------------------

running the scheduled package: org.apache.activemq.broker.scheduler - from activemq-unit-tests would mostly verify if there is any code that depends on the messageId being the jobId

> 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
>            Priority: Major
>             Fix For: 5.x
>
>
> 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:#cc7832};
> {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:#cc7832};
> {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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)