问题
I programmed a Storm topology that listens on particular topic on kafka with its spouts. Now I have to migrate it on activeMQ. Is possible to reproduce these topics with activeMQ and create spouts that listen them as I did with kafka?
I googled it, but it is not clear how I can send a message to a topic or listen a particular topic. In kafka a do something like
data = new KeyedMessage<>("topic", sms);
producer.send(data);
to send sms on topic and just create a
new kafkaspout("topic")
to listen it. In activeMQ?
It seems I have to do
Queue queue = session.createQueue("topic");
as many times as the number of topics and then to listen them I have to write something like
Queue queue = session.createQueue("topic");
consumer = session.createConsumer(queue);
I'm not sure this is the right approach and I'd like to be supported by any suggestions!
来源:https://stackoverflow.com/questions/29011243/how-can-i-do-a-storm-spout-that-listen-an-activemq-topic