Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
5.15.4
-
None
-
Java 8
AMQ 5.15.4
Description
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:
@Overridepublic TabularData getAllJobs() throws Exception {
OpenTypeFactory factory = OpenTypeSupport.getFactory(Job.class); CompositeType ct = factory.getCompositeType(); TabularType tt = new TabularType("Scheduled Jobs", "Scheduled Jobs", ct, new String[] { "jobId" {color}}); TabularDataSupport rc = new TabularDataSupport(tt); List<Job> jobs = this.jobScheduler.getAllJobs(); for (Job job : jobs) {
rc.put(new CompositeDataSupport(ct, factory.getFields(job))); }
return 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>