I attempted to create a JavaScript code for an ActiveMQ subscriber that would subscribe to a specific topic, but unfortunately I am not receiving any messages after establishing the connection.
The topic that needs to be subscribed to is COO.255227045008372
var client = Stomp.client("ws://localhost:61614?consumer.prefetchSize=1","v11.stomp");
client.debug = null;
var selectedVehicleImei = 255227045008372;
client.connect("", "", function (topic) {
client.subscribe("COO." + selectedVehicleImei, function (message) {
var infodata = JSON.parse(message.body);
console.log(infodata);
})
})
In the Admin console
The Queue
section shows a queue named COO.255227045008372
.
The Topic
section displays the following topic names:
ActiveMQ.Advisory.Consumer.Queue.COO.255227045008372
ActiveMQ.Advisory.Producer.Topic.COO.255227045008372
COO.255227045008372
Although I only utilized topics in my code, it seems there are also queues present. Could this be causing the issue? I'm new to ActiveMQ concepts, so I would appreciate any help or guidance on resolving this matter...