0
votes
@Component
public class OrderItemListener{

    @Autowired
    private final StoreService storeService;

    @JmsListener(destination = "order.item.queue")
    public void receiveOrder(String message) {
        //processing
    }
}

This is my POJO class for receiving messages. I can send messages here through JCONSOLE however, what if I have another application that needs to send a message to this listener/queue? How would I dentify the address? This is automatically configured through spring-boot. I only specified the activemq jar.

1

1 Answers

0
votes
@Autowired
private JmsTemplate template;

...


    this.template.convertAndSend("order.item.queue", "foo");

If this is running in a different JVM you will need a stand-alone broker and set spring.activemq.broker-url=tcp://somehost:61616.