// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; using NMS; using ActiveMQ; namespace E { public class MainClass { public static void Main(string[] args) { IConnectionFactory cf = new ConnectionFactory(new Uri("tcp://localhost:61616")); IConnection con = cf.CreateConnection(); con.Start(); ISession ses = con.CreateSession(AcknowledgementMode.AutoAcknowledge); IMessageProducer s = ses.CreateProducer(ses.GetQueue("ArneQueue")); s.Send(ses.CreateTextMessage("Dette er en test")); con.Close(); } } }