Skip to content

Commit 370e3ec

Browse files
author
Tim Watson
committed
Merge bug25525 into default
2 parents 61f1a94 + 8204427 commit 370e3ec

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

projects/client/RabbitMQ.Client/src/client/messagepatterns/Subscription.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,19 @@ public Subscription(IModel model, string queueName, bool noAck)
128128
m_latestEvent = null;
129129
}
130130

131+
132+
///<summary>Creates a new Subscription, with full control over
133+
///both "noAck" mode, the name of the queue, and the consumer tag.</summary>
134+
public Subscription(IModel model, string queueName, bool noAck, string consumerTag)
135+
{
136+
m_model = model;
137+
m_queueName = queueName;
138+
m_noAck = noAck;
139+
m_consumer = new QueueingBasicConsumer(m_model);
140+
m_consumerTag = m_model.BasicConsume(m_queueName, m_noAck, consumerTag, m_consumer);
141+
m_latestEvent = null;
142+
}
143+
131144
///<summary>Closes this Subscription, cancelling the consumer
132145
///record in the server.</summary>
133146
public void Close()

0 commit comments

Comments
 (0)