spring integration mqtt over udp or mqtt-sn - spring

In IoT scenario a lot of standard force pushing packets to mqtt queues over UDP protocol. This scenario become more and more frequent day by day, and for this reason now we have a new kind of mqtt queues named mqtt-sn.
In spring-integration-mqtt I'm using a paho client, however this has a specific client implementation ready to use mqtt-sn (https://eclipse.org/paho/clients/c/embedded-sn/) and there is also an implementation of moquitto over mqtt-sn (https://github.com/eclipse/mosquitto.rsmb).
There is any way to for spring-integration-mqtt over UDP protocol or there is an implementation which allow to use mqtt-sn over spring-integration?

Most (if not all) MQTT-SN broker bridge the messages to MQTT topics so just use the normal Spring/MQTT integration with a suitable broker.

Related

Is the Solace message broker compatible with "regular" AMQP or JMS clients?

I'd like to use regular AMQP or JMS clients to connect to a Solace message broker but don't know enough about these protocols to know if they are compatible. From what I can tell Solace implements AMQP and JMS bu possibly with incompatible extensions (e.g. "message vpn").
Does Solace have incompatible extensions, particularly for JMS, or is there a straightforward way to get a JMS client to speak to a Solace broker with "message vpn" enabled?
The choice is yours as Solace provides both a JMS client implementation and it also supports AMQP 1.0.
Keep in mind that JMS is an API and AMQP is a protocol. The JMS API can be implemented over any suitable wire protocol, and AMQP can be exposed via any suitable API. JMS is Java-based and there are many JMS implementations using different protocols under the covers. There are also many AMQP clients written in different languages on different platforms all with different APIs. There are even projects which combine both JMS and AMQP like Qpid JMS.
Solace's PubSub+ event broker works on binary payloads which means that you can indeed publish and consume messages on cross protocols and APIs.
The Solace APIs have detailed documentation on how to process the payload in a type agnostic fashion.
As you can see in this diagram, we support a wide range of APIs and protocol integrations.
There are also sample codes present over at this Github account listing examples on using Solace broker with JMS and AMQP : https://github.com/SolaceSamples?
(Answering my own question).
I basically wanted to know if it was possible to connect to a Solace/JMS broker using more popular messaging libraries. As far as I can tell the answer is no in general.
For example,
one feature of JMS is JNDI lookup of the InitialContextFactory. I don't think that is possible to do outside of a JMS library.

Does ActiveMQ uses TCP as its transport layer protocol

I've encounter a problem where our WebSocket connections to ActiveMQ 5.13.3 are terminated abruptly. I thought, I might use WireShark to inspect the TCP layer for clues why the connection may be corrupted, but I'm not sure the ActiveMQ uses TCP protocol as its transport layer protocol for sending the messages.
All the kinds of clients and protocols which ActiveMQ supports use TCP as their transport layer. WebSockets specifically use TCP.
ActiveMQ Broker supports many transport layer protocols, including TCP.
References:
If you are using ActiveMQ Classic:
https://activemq.apache.org/components/classic/
If you are using ActiveMQ Artemis:
https://activemq.apache.org/components/artemis/

Is there an IPC transport for MassTransit?

It's my understanding that the MassTransit in-memory transport only supports endpoints within the same process. Assuming that's accurate, is there an IPC transport available? If not, is there any documentation on how to go about implementing a custom transport?
There are no interprocess communication transports for MassTransit, the transport all use a message broker (such as RabbitMQ, ActiveMQ, etc.).
There isn't specific guidance on how to create your own transport, the only suggestion is to use an existing transport (such as the in-memory one) to build a new transport for IPC (if that's what you want).

What's the best way to integrate a mqtt broker with tomcat

I have a tomcat7 application currently accepting https calls which carry a JSON payload. So this work perfectly in a client/server relationship.
I want to be able to push data out to 'clients' so am investigating using MQTT. This work fine - I can publish/subscribe messages between MQTT broker and the 'clients'.
I want now to be able to re-use my Tomcat code. Do I configure tomcat to publish/subscribe to MQTT topics? Do I make some 3rd process which subscribes to MQTT topic and calls into tomcat.
I'm at the beginning of my investigation stage of a project. Any help/recommendations are appreciated.
Yes it is possible, there are many client libraries available (e.g. Poho for Java), so your server can subscribe/publish messages. Now to handle multiple messages published from various clients, implement a message queue.
Checkout this, RabbitMQ MQTT Adapter
https://www.rabbitmq.com/mqtt.html

Which transport protocol does Open MQ use?

I heard a guy from IBM give a talk about MQTT and he said that MQTT is the most lightweight messaging protocol as of today. His argument was that the smallest overhead produced for a single message is 2 bytes. However, I've heard the very same (2 bytes overhead) about HTML5 WebSockets too? Anyways, as I plan to use Open MQ as a JMS provider for a messaging application, which protocol my provider use became of interest to me. I cannot anywhere find the answer to that question and I even googled the Open MQ documentation and the documentation of GlassFish which use Open MQ as a JMS provider. Some blog posts and the like on Internet says AMQP but I cannot find a solid reference to back that statement up.
Which protocol does Open MQ use, and how would you know?
I think you mix a few things up: MQTT is an application level protocol and uses TCP as transport protocol. MQTT can also be used with Websockets as transport. MQTT is, if you will, a lightweight alternative to JMS and AMQP.
AMQP is a popular and reliable alternative to JMS and is well suited for business and mission critical messaging. It is very feature rich and widely used. Note that AMQP is a messaging protocol while JMS is an API (which can even use AMQP as transport). You can use AMQP directly in Java Applications with Libraries such as the RabbitMQ Java Client.
MQTT on the other hand is perfect fit for telemetry data and scenarios where you have many clients which communicate with a single message broker and where low bandwidth usage, memory efficiency and battery life on the clients is key.
JMS does not define any transport protocol (in contrast to MQTT) and anything could be used here. I personally think TCP is a good fit here, too.
I do not know about OpenMQ but for JMS and AMQP I can recommend ActiveMQ. For MQTT there are a few brokers out there including HiveMQ and Mosquitto.
Obligatory Disclaimer: I am a developer of HiveMQ, so I am probably a bit biased ;-)
I think OpenMQ is using STOMP as Application Level Protocl. There is no other documentation which protocol OpenMQ supports than STOMP.
Edit: found the UMS Protocol and it seems OpenMQ is using this per default. https://mq.java.net/4.3-content/ums/umsIntro.html
OpenMQ is not able to use AMQP so I would recommend RabbitMQ.

Resources