Benutzer:MovGP0/ActiveMQ
aus Wikipedia, der freien Enzyklopädie
MovGP0 | Über mich | Hilfen | Artikel | Weblinks | Literatur | Zitate | Notizen | Programmierung | MSCert | Physik |
ActiveMQNMS API.Net Message Service API (NMS API) provides connectivity to[1]
NMS API WCF-Bindings
JMS Message
NMS API Consumerusing System;
using Apache.NMS;
using Apache.NMS.Util;
using Apache.NMS.ActiveMQ;
namespace MyApp
{
public class Consumer
{
public static void Main()
{
var nmsFactory = new NMSConnectionFactory("tcp://localhost:61616");
IConnection connection = nmsFactory.CreateConnection();
ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge);
IDestination destination = session.GetTopic("STOCKS.JAVA");
IMessageConsumer consumer = session.CreateConsumer(destination);
consumer.Listener += new MessageListener(OnMessage);
connection.Start();
Console.WriteLine("Press any key to quit.");
Console.ReadKey();
}
protected static void OnMessage(IMessage message)
{
var TextMessage = message as ITextMessage;
Console.WriteLine(TextMessage.Text);
}
}
}
Internetquellen
Referenzen
|