0
@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.

user962206
  • 15,637
  • 61
  • 177
  • 270

1 Answers1

0
@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.

Gary Russell
  • 166,535
  • 14
  • 146
  • 179