Hi Gayan,

Yes, it is enabled in conf/activemq.xml:

<transportConnectors>
            <!-- DOS protection, limit concurrent connections to 1000 and frame 
size to 100MB -->
            <transportConnector name="openwire" 
uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
            <!--<transportConnector name="amqp" 
uri="amqp://0.0.0.0:5672?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>-->
            <transportConnector name="stomp" 
uri="stomp://0.0.0.0:61613?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
            <transportConnector name="mqtt" 
uri="mqtt://0.0.0.0:1883?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
            <transportConnector name="ws" 
uri="ws://0.0.0.0:61614?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
        </transportConnectors>


Here is the exception (see the highlighted text) I am getting and the 
configuration. From the exception it seems it is already connected ?!

TID: [0] [STRATOS] [2015-02-24 03:43:01,039] ERROR 
{org.apache.stratos.messaging.broker.connect.mqtt.MqttTopicConnector} -  Could 
not connect to message broker
Client is connected (32100)
        at 
org.eclipse.paho.client.mqttv3.internal.ExceptionHelper.createMqttException(ExceptionHelper.java:27)
        at 
org.eclipse.paho.client.mqttv3.MqttAsyncClient.connect(MqttAsyncClient.java:452)
        at 
org.eclipse.paho.client.mqttv3.MqttClient.connect(MqttClient.java:236)
        at 
org.apache.stratos.messaging.broker.connect.mqtt.MqttTopicConnector.connect(MqttTopicConnector.java:67)
        at 
org.apache.stratos.messaging.broker.publish.EventPublisher.publish(EventPublisher.java:70)
        at 
org.apache.stratos.messaging.broker.publish.EventPublisher.publish(EventPublisher.java:58)
        at 
org.apache.stratos.cloud.controller.messaging.publisher.TopologyEventPublisher.publishEvent(TopologyEventPublisher.java:348)
        at 
org.apache.stratos.cloud.controller.messaging.publisher.TopologyEventPublisher.sendCompleteTopologyEvent(TopologyEventPublisher.java:318)
        at 
org.apache.stratos.cloud.controller.messaging.publisher.TopologySynchronizerTask.execute(TopologySynchronizerTask.java:58)
        at 
org.wso2.carbon.ntask.core.impl.TaskQuartzJobAdapter.execute(TaskQuartzJobAdapter.java:67)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

I started the stratos server with the option
-Dmessaging.transport=mqtt to utilize mqtt,
and the mqtt.properties is:
mqtturl=tcp://localhost:1883
clientID=stratos
tempfilelocation=/tmp

From: Gayan Gunarathne [mailto:[email protected]]
Sent: Monday, February 23, 2015 9:16 PM
To: [email protected]
Subject: Re: Question: which messaging protocol to use ?

Hi Martin,

Regarding the exception , did u enable the "mqtt transportConnector" with in 
the activemq message broker?
(That can be found in <ActiveMQ_HOME>/bin/activemq.xml)

Thanks,
Gayan

On Tue, Feb 24, 2015 at 10:11 AM, Gayan Gunarathne 
<[email protected]<mailto:[email protected]>> wrote:
Hi Martin,

We are supporting both amqp and mqtt protocols. By default we are set to the 
amqp protocol.According to the user preference user can change it to amqp or 
mqtt.

With the integration testing ,we have used the embedded activemq with maven. 
AFAIK we had a problem to connect that embedded activemq with mqtt protocol. 
Therefore the integration testing we are using the amqp protocol as a messaging 
protocol.But for the normal usage we can use either ampq or mqtt protocols 
based on  the user preference.

Thanks,
Gayan

On Tue, Feb 24, 2015 at 8:56 AM, Martin Eppel (meppel) 
<[email protected]<mailto:[email protected]>> wrote:
Which amq protocol is officially supported, amqp or mqtt or both ?

It seems the code based on 4.1.0-alpha was using mqtt by default, however  when 
I pulled the latest code from the master things seem to have changed and amqp 
is default messaging protocol. Will protocol will be supported in long term ?

Thanks

Martin





--

Gayan Gunarathne
Technical Lead
WSO2 Inc. (http://wso2.com<http://wso2.com/>)
email  : [email protected]<mailto:[email protected]>  | mobile : +94 
766819985<tel:%2B94%20766819985>




--

Gayan Gunarathne
Technical Lead
WSO2 Inc. (http://wso2.com<http://wso2.com/>)
email  : [email protected]<mailto:[email protected]>  | mobile : +94 766819985

Reply via email to