spring-projects / spring-integration

Spring Integration provides an extension of the Spring programming model to support the well-known Enterprise Integration Patterns (EIP)
http://projects.spring.io/spring-integration/
Apache License 2.0
1.54k stars 1.1k forks source link

INT - Spring Integration Message listener showing 2 instance on queue [INT-3424] #7393

Closed spring-operator closed 10 years ago

spring-operator commented 10 years ago

Kumar Amit opened INT-3424 and commented

•It was observed that there are two listeners (rather than one) that are contending to listen


Affects: 2.2.6

spring-operator commented 10 years ago

Kumar Amit commented

Kumar Amit added a comment - Today 8:56 AM Hi Gray, I am facing one issue seeing two instance of listener in Queue.

We are defining default message listener which we configured in spring configuration xml but once we start its show two reader by default. Could you please help me in that. Thanks amit Show Kumar Amit added a comment - Today 8:56 AM Hi Gray, I am facing one issue seeing two instance of listener in Queue. We are defining default message listener which we configured in spring configuration xml but once we start its show two reader by default. Could you please help me in that. Thanks amit .Hide Permalink Gary Russell added a comment - Today 9:44 AM Is this running in a web application?

A common mistake is to load the Spring Integration configuration into both the servlet context and the root (ContextLoaderListener) context.

If not; turn on debug logging for org.springframework; it emits copious logs for context loading; and all should become clear.

spring-operator commented 10 years ago

Gary Russell commented

Please attach complete configuration and DEBUG logs and we will reopen this issue if there really is a problem. You provide no evidence that you have attempted to debug your configuration.

As I said before JIRA is not the appropriate medium to ask questions and debug your configuration.

spring-operator commented 10 years ago

Kumar Amit commented

Thank you Gray for help.

spring-operator commented 10 years ago

Kumar Amit commented

Thanks Gray please guide me where to place my questions.

spring-operator commented 10 years ago

Artem Bilan commented

where to place my questions.

On the StackOverflow under spring-integration tag

Cheers

spring-operator commented 10 years ago

Gary Russell commented

It appears that you are simply not reading my replies and not taking any actions I recommend; my patience is wearing thin.

The information Artem just provided was in my reply to the other JIRA you hijacked (#7234).

In that same reply (and in the text you copied above); I suggested to you that the most likely reason is you are loading the context twice (once in the context loader listener and once in the dispatcher servlet).

If you do that, you will, indeed, get two endpoints listening on the queue.

I also said turn on DEBUG logging and you will see the beans being loaded twice.

Please don't ask any more questions (here or anywhere) unless you have hard evidence that there is a problem with the framework and that you don't have a mis-configured system with the context being loaded twice. By hard evidence, I mean a DEBUG log that spans the time of application startup to the point where the 2 listeners are running.

You will find that this team is very responsive to user questions and real problems, but we can't help if you don't do what we suggest.