.Net Messaging and STOMP

I have doubts about .net messaging and its compatibility with other open protocols. I would like to know if the .net messaging API can work with STOMP? How can I use this protocol? is there any specific library i need to use?

Thank you for sharing experiences and ideas.

+7
message-queue stomp
source share
2 answers

At its core, STOMP is a TCP-based messaging with its set of commands and control characters.

There is nothing in .NET that would cast doubt on the impossibility of creating an application or library using this protocol. If you are building the .NET STOMP library from scratch, you will have to use System.Net.Sockets . Here is a sample C # code.

 Byte[] bytesSent = Encoding.ASCII.GetBytes(someStringMessage); // Create a socket connection with the specified server and port. Socket s = ConnectSocket("192.168.0.101", somePort); // If the socket could not get a connection, then return false. if (s == null) return false; // Send message to the destination. s.Send(bytesSent, bytesSent.Length, 0); // Receive the response back int bytes = 0; s.ReceiveTimeout = 3000; bytes = s.Receive(bytesReceived, bytesReceived.Length, 0); string page = Encoding.ASCII.GetString(bytesReceived, 0, bytes); s.Close(); 

What doubts did you have? Perhaps edit your question with any problems?

+2
source share

If your goal is to send messages from the .NET language, consider using the Apache ActiveMQ NMS library for .NET . They claim to use the same API to connect to several different providers.

The following providers are currently available:

  • ActiveMQ, which connects using OpenWire to an ActiveMQ message broker.
  • STOMP, which connects to any STOMP broker.

Their site linked above has downloads and links to articles on how to get started with common message scripts.

+5
source share

All Articles