Create MessageProducer with a sync call in order to catch creation errors.
Fixes [AMQNET-AMQNET-523]. (See https://issues.apache.org/jira/browse/AMQNET-AMQNET-523)
diff --git a/src/main/csharp/Session.cs b/src/main/csharp/Session.cs
index ef91700..e09f6b1 100755
--- a/src/main/csharp/Session.cs
+++ b/src/main/csharp/Session.cs
@@ -460,7 +460,7 @@
producer.ProducerTransformer = this.ProducerTransformer;
this.AddProducer(producer);
- this.Connection.Oneway(producer.ProducerInfo);
+ this.Connection.SyncRequest(producer.ProducerInfo);
}
catch(Exception)
{