0

I am using WSO2 CEP 4.2.0 and have created MQTT input event adapter. I have also created the receiver which will receive the data from a external topic and then using streams, I am adding some logics and then same message will be published using publishers to another external topic.

Now, When I restart the application, I get below two messages:

INFO {org.wso2.carbon.event.input.adapter.core.internal.InputAdapterRuntime} -  Connecting receiver mqttreceiver_test
INFO {org.wso2.carbon.event.input.adapter.mqtt.internal.util.MQTTAdapterListener} -  MQTT Connection successful

And then When I am publishing the message from external mqtt client, I can see that message arrives the event receiver and after stream processing, the message goes to output event publisher.

But after approx 5 mins, the messages are not received any more in the event receiver. I do not get any error message also in logs but what I could sense is may be the input adapter is not listening any more. Any suggestions or any guidance will help.

Thanks

Community
  • 1
  • 1
2437850
  • 287
  • 2
  • 10

1 Answers1

0

Few things I could suggest to debug this issue:

  1. Perhaps the flow is broken so that the event does not reach the output event publisher? You could use logger event publisher [1] and log the stream that is generated by the MQTT input event adapter.
  2. Enable debug logs for package org.wso2.carbon.event.input.adapter.mqtt.internal.util so that you will see a log when the MQTTAdapterListener receives a message (See [2] ). You can follow [3] to enable debug logs.
  3. When the issue happens, take a thread dump and see whether the MQTTAdapterListener thread is running.

Hope these will help you to narrow down the issue.

[1] https://docs.wso2.com/display/CEP420/Logger+Event+Publisher

[2] https://github.com/wso2/carbon-analytics-common/blob/v5.1.3/components/event-receiver/event-input-adapters/org.wso2.carbon.event.input.adapter.mqtt/src/main/java/org/wso2/carbon/event/input/adapter/mqtt/internal/util/MQTTAdapterListener.java#L150

[3] https://docs.wso2.com/display/CEP420/Logging

Dilini
  • 777
  • 8
  • 22
  • I enabled these logs and also taken thread dumps but there are no any indications why the adapter goes into unlisten mode. Is there any bug in cep 4.2.0? – 2437850 Jun 24 '19 at 08:44