-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Closed
Labels
in: messagingIssues in messaging modules (jms, messaging)Issues in messaging modules (jms, messaging)type: bugA general bugA general bug
Milestone
Description
I have a simple JmsListener that is listening to messages published to an ActiveMQ classic queue
@JmsListener(destination = "ReportScheduleQueue")
public void receiveMessage(String message) {
log.info("Received message - {}", message);
}
@Scheduled(cron = "0 */1 * ? * *")
public void sendMessage() {
jmsTemplate.convertAndSend("ReportScheduleQueue", "test message sent at " + new Date());
}
After a couple of message were triggered, I notice that the publish count is 2 but the process count is 4
"jms.message.process.error.none.exception.none.messaging.destination.name.ReportScheduleQueue.count": "4",
"jms.message.publish.error.none.exception.none.messaging.destination.name.ReportScheduleQueue.count": "2"
Looks like both AbstractPollingMessageListenerContainer and AbstractMessageListenerContainer are recording the observation and since AbstractPollingMessageListenerContainer extends AbstractMessageListenerContainer , we end up reporting the process count twice.
Metadata
Metadata
Assignees
Labels
in: messagingIssues in messaging modules (jms, messaging)Issues in messaging modules (jms, messaging)type: bugA general bugA general bug