Win a copy of Head First Android this week in the Android forum!

Mahalaghda Gumbahldi

Greenhorn
+ Follow
since Jun 25, 2015
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Mahalaghda Gumbahldi

I just figured out the issue - my app class wasn't being loaded into/from the context >_<
6 years ago
Oh and one other piece I forgot to mention - Until I close the JVM myself, 1 connection and 1 channel do remain open in the RabbitMQ admin page. So I'm guessing that has something to do with it - but I cannot figure out how to get that connection to close? I would think that the context closing would signal the connection to close as well, but as I said I am very new to all of this
6 years ago
Hi all,

I'm relatively new to Spring and very new to RabbitMQ. I've been trying to learn the basics of Spring's AMQP integration, but I'm getting hung up on something.

All I'm trying to do is create a basic RabbitTemplate and send a simple String to the default exchange, with the routing key set to just a test queue I made. That all works fine - the message is sent, and the SimpleMessageListenerContainer consumes and processes the message just fine.

Everything (I believe) is being created within the Spring context, and it's all just started from a main method - what seems to be happening though is whatever thread that sends the message is not ending, and as a result the JVM will not close until I actually stop it (all from within Eclipse)

Here is my app configuration:



And here is my MessageHandler:



And finally the main App that launches the context:



Is this expected? Am I just missing some fundamental concept? Any help in understanding this behavior would be greatly appreciated!
6 years ago