Java code connect UM by MQTT protocol?

Hi All

I want to use jave code to connect the UM by MQTT protocol.
Who can provide me a sample for MQTT clients for subscriptions and publishing?

My UM server: nsp://localhost:9000

I can use java code to connect ActiveMQ by MQTT protocol.

Thanks

Check if http://um.terracotta.org/ helps you for UM API reference.

You can also contact SAG global support, they might provide a sample code snippet.

Hi,

MQTT is a standard wire protocol. Software AG doesn’t provide an MQTT client, so you will need to use a 3rd party client library. The most widely used is the Eclipse Paho client: Eclipse Paho | The Eclipse Foundation
This also includes some simple samples that will also work with UM. Note that MQTT messages are binary (byte) messages, so if you want interoperability with JMS, for example, you will have to use JMS bytes messages.

I would recommend that you set up a separate interface (port) for your MQTT communication. The default port number for MQTT is 1883, so you should set up an nsp interface on port 1883 and make sure it is started (in Enterprise Manager).

Hope this helps.

Thank you very much.


I would recommend that you set up a separate interface (port) for your MQTT communication. The default port number for MQTT is 1883, so you should set up an nsp interface on port 1883 and make sure it is started (in Enterprise Manager).

I can’t find any information for ‘setup an nsp interface on port 1883’.
Can you give me a few guidance? Thanks.

My Enterprise Manager screenshot:
See Attachments

Here’s how to create an nsp interface on port 1883:

  • In Enterprise Manager, select the realm on the left
  • Click the Comms tab on the right
  • Click the Interfaces tab just below that
  • Click the Add Interface button at the bottom
  • Select protocol nsp, port 1883, select auto-start and leave the rest as defaults
  • Click OK

Thanks Jonathan.
I know how to do it. Base on your reply,It works to connect UM(by MQTT protocol). Thanks again. :smiley:

Thanks Jonathan.
I know how to do it. Base on your reply,It works to connect UM(by MQTT protocol). Thanks again. :smiley:

I created as you said,here not showing MQTT connection could please help on this.

Ramanjaneyulu Borusu see ->[url]Java code connect UM by MQTT protocol? - webMethods - Software AG Tech Community & Forums