Does anyone know if it's possible, or have an example of using Node.js to connect to a SonicMQ broker? I have not been able to find any information or examples online.
I would suggest to use either a Sonic Connect exposing a rest service(need ESB) or defining an http Acceptor to communicate with the queue(Direct connection to broker).
Regards
Related
An Azure Service Bus/Queue question...
We have systems (SystemA) that have 'no' internet connection direclty, but can connect to another server (SystemB) via whatever ports we decide to open.
SystemB can connect to internet and Azure no problem.
But I can't see how to use SendVia so that I can say
SystemA, Send a Queue message Via SystemB.
(https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-transactions)
What would we install on SystemB... or is Send Via just for, well, I don't know what it's for if not this...
Would we have to roll our own solution for SystemA->SystemB part? Or am I missing somthing?
Thanks for any assistance.
Send-via is not what you think it is. It only can operate on the same namespace and connection.
or is Send Via just for, well, I don't know what it's for if not this...
The feature is intended for transactional processing of the incoming message with the dispatch of the outgoing messages.
We are developing application for chatting.But when I am sending messages and if internet connectivity is gone how will I be able to send the messages like what's app do?
You have to use a message broker software like RabbitMQ (https://www.rabbitmq.com) to handle these kind of situations.
Off course, you can't really send messages offline, so what applications do is:
buffering/storing "sent" messages if there is no network available
check/await for network connection to be reestablished
Actually send messages when application reconnects
For achieving this, if you're looking mainly on chat, you can use some library/package/software (as for example RabbitMQ mentioned on #Badis Merabet answer).
If there is no prebuilt solution available for your use case or you want to develop you own solution, you may use PWAs. Here are some links:
General information on PWAs
Angular PWA docs
You may also check this answer for more information. The last link have a cookbook on an approach to implement it.
Normally, MQTT module is used to send messages for communication purpose. I am a beginner in nodejs programming. Am I able to send the data from one node app to another app using MQTT module? If it is possible can anyone tell me
how to do so?
Yes, it is possible.
Client: https://github.com/mqttjs/MQTT.js
Server: https://github.com/mcollina/mosca
Take at look at their documentation. They have great examples.
Is it possible to implement a two-way communication between client and server with Apache Thrift? Thus not only to be able to make RPC from client to server, but also the other way round? In my project I have the requirement that the server must also push some data to the client without being asked by the client before to do this.
There are two ways how to achieve this with Thrift.
If both ends are more or less peers and you connect them through sockets or pipes, you simply set up a server and a client on both ends and you're pretty much done. This does not work in all cases, however, especially with HTTP.
If you connect server and client through HTTP or a similar channel, there is a technique called "long polling". It basically requires the client to call the server as usual, but the call will only return when the server wants to send some data back to the client. After receiving the data, the client starts another call if he's still interested in more data.
As Denis pointed out, depending on your exact use case, you might want to consider using a MQ system. Note that it is still possible to use Thrift to de/serialize the messages into and from the queues. The contrib folder has some examples that show how to use Thrift with ZMQ, Rebus and some others.
You are better to use queues then, e.g. ZeroMQ.
I try to make connection between Leap Motion and mobile devices in Unity3D, via node.js.
Here are two examples I found online using node.js, this and this.
Now, I have successfully receive data from Leap Motion in this procedure:
Receiving JSON-formatted messages from "localhost:6437" in node.js
Parsing and Writing received data on another port (I use "localhost:8000") in node.js
Reading stream from port: 8000 in Unity3D
However, I wonder if it's possible to receive data DIRECTLY from "localhost:6437"? then maybe node.js is not needed.
I have tried to write in C# using TcpClient, but when I check "NetworkStream.DataAvailable", it returns false.
Thanks for your help.
For that you would need a WebSocket client, not a TCP client.