Hello ,
I want to implement a client on Android, which sends the messages to Queue/Topic deployed using hornetQ in JBoss.
It is not possible to establish the connection in Android using JMS and hornetQ, as the javax.* packages are not availble on it and it is required to establish javax.jms.ConnectionFactory (ConnectionFactory cfactory = (ConnectionFactory) HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF,transportConfiguration);
Is it possible to use MQTT in Android, which is actually used for ActiveMQ?
org.fusesource.mqtt.client.MQTT mqtt = new MQTT();
mqtt.setHost("tcp://IP of my computer", 5445); // set own ip and port, which is configured in JBoss.
mqtt.setUserName(sUserName);
mqtt.setPassword(sPassword);
org.fusesource.mqtt.client.FutureConnection connection = mqtt.futureConnection();
connection.connect();
org.fusesource.mqtt.client.Topic[] topics = {new Topic(sDestination, QoS.AT_LEAST_ONCE)};
connection.subscribe(topics);
or are there some other possibilities to connect to the Queues and Topics from Android?