Skip to content

Instantly share code, notes, and snippets.

@madan712
Created May 31, 2020 10:01
Show Gist options
  • Save madan712/5e4259239dc7492ff31ac8f1a2eda3a7 to your computer and use it in GitHub Desktop.
Save madan712/5e4259239dc7492ff31ac8f1a2eda3a7 to your computer and use it in GitHub Desktop.
Receiver.java - Spring boot ActiveMQ example
package com.javaxp.testjmsclient;
import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;
@Component
public class Receiver {
@JmsListener(destination = "myQueue")
public void readMessage(String message) {
System.out.println("Received message: " + message);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment