本文整理汇总了C#中ISession.CreateQueue方法的典型用法代码示例。如果您正苦于以下问题:C# ISession.CreateQueue方法的具体用法?C# ISession.CreateQueue怎么用?C# ISession.CreateQueue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISession
的用法示例。
在下文中一共展示了ISession.CreateQueue方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Connect
private void Connect()
{
factory = XmsUtilities.CreateConnectionFactory(destination);
connection = factory.CreateConnection();
connection.ExceptionListener += OnError;
session = connection.CreateSession(transactional, AcknowledgeMode.AutoAcknowledge);
queue = session.CreateQueue(destination.Queue);
queue.SetIntProperty(XMSC.DELIVERY_MODE, XMSC.DELIVERY_PERSISTENT);
producer = session.CreateProducer(queue);
}
示例2: Connect
public void Connect()
{
log.Debug("New physical producer created. About to connect.");
factory = XmsUtilities.CreateConnectionFactory(address);
connection = factory.CreateConnection();
connection.ExceptionListener += OnError;
session = connection.CreateSession(transactional, AcknowledgeMode.AutoAcknowledge);
queue = session.CreateQueue(address.Queue);
queue.SetIntProperty(XMSC.DELIVERY_MODE, XMSC.DELIVERY_PERSISTENT);
producer = session.CreateProducer(queue);
connected = true;
log.Debug("New physical producer successfully connected.");
}
示例3: Connect
public void Connect()
{
factory = XmsUtilities.CreateConnectionFactory(address);
connection = factory.CreateConnection();
connection.ExceptionListener += OnError;
session = connection.CreateSession(transactional, AcknowledgeMode.AutoAcknowledge);
queue = session.CreateQueue(address.Queue);
queue.SetIntProperty(XMSC.DELIVERY_MODE,
transactional ? XMSC.DELIVERY_PERSISTENT : XMSC.DELIVERY_NOT_PERSISTENT);
consumer = session.CreateConsumer(queue);
connection.Start();
connected = true;
}
示例4: ResolveQueue
/// <summary> Resolve the given destination name to a Queue.</summary>
/// <param name="session">the current EMS Session
/// </param>
/// <param name="queueName">the name of the desired Queue.
/// </param>
/// <returns> the EMS Queue name
/// </returns>
/// <throws>EMSException if resolution failed </throws>
protected internal virtual Destination ResolveQueue(ISession session, string queueName)
{
return session.CreateQueue(queueName);
}