Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9161131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:53:57+00:00 2026-06-17T13:53:57+00:00

I am trying to receive/send message from queue of activeMQ using stomp protocol using

  • 0

I am trying to receive/send message from queue of activeMQ using stomp protocol using c#. As I don’t know much about activemq and stomp. So I’m searching for some proper document or sample code by which I can learn step by step.

  static void Main(string[] args)
    {
        Apache.NMS.Stomp.ConnectionFactory factory  = new Apache.NMS.Stomp.ConnectionFactory(new Uri("stomp:tcp://localhost:61613"));
        IConnection connection = factory.CreateConnection();
        ISession session = connection.CreateSession();
        IDestination destination = session.GetDestination("/queue/notification");
        IMessageConsumer consumer = session.CreateConsumer(destination);
        connection.Start();
        consumer.Listener += new MessageListener(OnMessage);
        Console.WriteLine("Consumer started, waiting for messages... (Press ENTER to stop.)");
        Console.ReadLine();
        connection.Close();
    }
    private static void OnMessage(IMessage message)
    { 
        try
        { 
            Console.WriteLine("Median-Server (.NET): Message received"); 
            ITextMessage msg = (ITextMessage)message; 
            message.Acknowledge();
            Console.WriteLine(msg.Text);
        } 
        catch (Exception ex)
        { 
            Console.WriteLine(ex.Message);
            Console.WriteLine("---");
            Console.WriteLine(ex.InnerException);
            Console.WriteLine("---"); 
            Console.WriteLine(ex.InnerException.Message);
        }
    }
}

}
I have tried this. Is it a correct way to make stomp connection.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T13:53:59+00:00Added an answer on June 17, 2026 at 1:53 pm

    There are client libraries for STOMP in various languages, for .NET there’s the Apache.NMS.Stomp library which puts a JMS type facade around STOMP semantics. If you want to get more technical and learn what the STOMP protocol really is, then the STOMP spec is quite clear and easy to understand. And of course ActiveMQ’s own site has some documentation on its STOMP support that you should read. Some web searching will also quickly net you some nice blog posts on using the NMS.Stomp library to interact with ActiveMQ.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to send and receive message using XMPP framework. I used XMPPStream
I'm trying perform a relatively basic TCP socket send/receive operation on Windows CE using
I am trying to develop the XMPP Gateway which can send/receive from standard XMPP
I'm trying to send and receive using pipes: send.cpp struct { long a; long
For about a year now, I've had problems trying to send and receive email
I'm trying to send and receive a client-event using a GtkWidget on the win32
I'm trying to develop an application in C to receive a message and send
I am new to Android. I am trying to send message (GCM) from my
I've been using the javax.cardio package to receive an NDEF message from my Nexus
for one of my applications, I am trying to send/receive commands/information from my GUI

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.