ActiveMQ topic send automatically

124 views Asked by At

I have some subscribers that they are listening to "mytopic"...I send message to them by browser UI just like attached image but now I want to do this work in code environment what should I do and whats that code and methods?

-----> attached image

Thanks

2

There are 2 answers

0
Torsten Mielke On

You should have mentioned what programming language you want to use. Every language may offer a different API and specification.

In case of using Java, you can simply program according to the JMS specification https://docs.oracle.com/javaee/7/api/javax/jms/package-summary.html

Also, the Apache ActiveMQ installation comes with a few examples that you can use as a reference. E.g. see examples/openwire/swissarmy/src/TopicPublisher.java

0
Dazed On

You should have a look at ActiveMQ Protocols - for example you can use the ActiveMQ REST API to POST messages to the topic or use JMS.

Then you can look at how to use these from a "client" (presumably your central server) perspective.

For REST from Java (say) you could look at this article