Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jms listeners not running #1200

Closed
ceremo opened this issue Jan 28, 2019 · 8 comments
Assignees
Labels
bug
Milestone

Comments

@ceremo
Copy link

@ceremo ceremo commented Jan 28, 2019

Hi,

I'm using spring-cloud-sleuth (2.1.0.RELEASE) and in this version I think there is a mistake in this commit 6bee9fc

The TracingJmsListenerEndpointRegistry is no longer defined as a bean, so this is causing that the listeners included in this registry are not starting.

I defined a jms listener using the annotation @JmsListener, and I checked that it registers to TracingJmsListenerEndpointRegistry not in JmsListenerEndpointRegistry, and the listener does not consume any messages. I defined the bean TracingJmsListenerEndpointRegistry as already was before this commit, and the listener consumes the messages.

Regards

@marcingrzejszczak

This comment has been minimized.

Copy link
Contributor

@marcingrzejszczak marcingrzejszczak commented Jan 28, 2019

Can you provide a complete, minimal, verifiable sample that reproduces the problem rather than pasted code? It should be available as a GitHub (or similar) project or attached to this issue as a zip file.

@ceremo

This comment has been minimized.

Copy link
Author

@ceremo ceremo commented Jan 28, 2019

Sorry, I'm working in a complex application so I'd have to create an example only for this. Before of create an example because it will take some time for me to create it, can you answer me this question, who is starting the listeners if they are registered in TracingJmsListenerEndpointRegistry? The method which starts the listeners is in JmsListenerEndpointRegistry (start) because of the implementation of the Lifecycle interface, so I understand that this method will be called if the registry is defined as a bean, and with the last commit there is only one registry in the context the generic JmsListenerEndpointRegistry which is not used by the JmsListenerEndpointRegistrar.

@marcingrzejszczak

This comment has been minimized.

Copy link
Contributor

@marcingrzejszczak marcingrzejszczak commented Jan 28, 2019

The EndpointRegistry bean should be there provided by Boot (at least that's what @snicoll says). Please provide the sample, without it it will be difficult to help you.

@fevenor

This comment has been minimized.

Copy link

@fevenor fevenor commented Jan 30, 2019

I have encountered the same problem, just add spring-boot-starter-activemq and spring-cloud-starter-sleuth to the pom file at the same time to reproduce the problem.
By the way, everything is fine in the 2.0.x version. According to the Spring Boot 2.1 Release Notes, ActiveMQ Pooling has some changes in the 2.1.x version.

@rschlick

This comment has been minimized.

Copy link

@rschlick rschlick commented Jan 31, 2019

I have the same problem since migration to spring cloud sleuth 2.1.0.
A workaround is to disable this feature:

We instrument the JmsTemplate so that tracing headers get injected into the message. We also support @JmsListener annotated methods on the consumer side.

To block this feature, set spring.sleuth.messaging.jms.enabled to false

spring.sleuth.messaging.jms.enabled=false

@molk

This comment has been minimized.

Copy link

@molk molk commented Feb 10, 2019

Same here. I extracted my issue here: https://github.com/molk/greenwhich-jms-issue

@vincent-r-kennedy

This comment has been minimized.

Copy link

@vincent-r-kennedy vincent-r-kennedy commented Mar 5, 2019

Apologies - I can see this issue is closed and is tagged with 2.1.1.RELEASE
My question is: Is there any ETA on that being available in maven central?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.