[rabbitmq-discuss] BasicPublish in .NET using client 2.8.1.0 and transaction support
martywaz
marty.wasznicky at neudesic.com
Thu Jun 13 19:02:49 BST 2013
When calling BasicPublish in .NET c#, is it required to explicitly make a
call to DtxStart and TxCommit to ensure that the message published is
within a transaction?
for example, our psudo code for creating a connection is this:
var connectionFactory = new ConnectionFactory
{
HostName = this.hostName,
Password = this.password,
Port = this.port != -1 ? this.port :
AmqpTcpEndpoint.UseDefaultPort,
UserName = this.userName,
Protocol = Protocols.FromConfiguration()
};
this.connection = connectionFactory.CreateConnection();
this.connection.ConnectionShutdown +=
this.ConnectionOnConnectionShutdown;
this.model = this.connection.CreateModel();
if (this.properties.Durable)
{
this.model.ConfirmSelect();
}
this.model.BasicAcks += new
BasicAckEventHandler(this.MessageAcknowledged);
this.model.BasicNacks += this.MessageNotAcknowledged;
this.model.BasicReturn += this.MessageReturned;
this.model.FlowControl += this.FlowControlChanged;
this.model.CallbackException += ReportCallbackException;
and psudo publish code looks like this:
this.model.BasicPublish(
this.exchangeName,
string.Empty,
this.properties.Durable,
this.properties.Immediate,
messageProperties,
body);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130613/352e1749/attachment.htm>
More information about the rabbitmq-discuss
mailing list