maxfortun commented on code in PR #949:
URL: https://github.com/apache/activemq/pull/949#discussion_r1063716430
##########
activemq-broker/src/main/java/org/apache/activemq/broker/scheduler/SchedulerBroker.java:
##########
@@ -418,6 +426,12 @@ public void scheduledJob(String id, ByteSequence job) {
producerExchange.setMutable(true);
producerExchange.setProducerState(new ProducerState(new
ProducerInfo()));
super.send(producerExchange, messageSend);
+
+ if(jobSchedulerActivityListener != null) {
+ Message msg = messageSend.copy();
+ msg.setProperty(ScheduledMessage.AMQ_SCHEDULER_ACTIVITY,
ScheduledMessage.AMQ_SCHEDULER_ACTIVITY_DISPATCHED);
+ jobSchedulerActivityListener.dispatched(this, msg);
+ }
Review Comment:
@mattrpav Once message is dispatched it has scheduledJobId property, so I
can use that, but I figured it is nice to have a single source to monitor
scheduler activity.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]