diff --git a/src/NMS.AMQP/Message/Facade/INmsMessageFacade.cs b/src/NMS.AMQP/Message/Facade/INmsMessageFacade.cs index 8561a572..7e7a1d2c 100644 --- a/src/NMS.AMQP/Message/Facade/INmsMessageFacade.cs +++ b/src/NMS.AMQP/Message/Facade/INmsMessageFacade.cs @@ -14,6 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + using System; namespace Apache.NMS.AMQP.Message.Facade @@ -29,6 +30,7 @@ public interface INmsMessageFacade IPrimitiveMap Properties { get; } string NMSCorrelationID { get; set; } IDestination NMSDestination { get; set; } + IDestination NMSConsumerDestination { get; set; } TimeSpan NMSTimeToLive { get; set; } MsgPriority NMSPriority { get; set; } bool NMSRedelivered { get; set; } @@ -40,7 +42,7 @@ public interface INmsMessageFacade uint GroupSequence { get; set; } DateTime? Expiration { get; set; } sbyte? JmsMsgType { get; } - + /// /// True if this message is tagged as being persistent /// diff --git a/src/NMS.AMQP/Provider/Amqp/Message/AmqpNmsMessageFacade.cs b/src/NMS.AMQP/Provider/Amqp/Message/AmqpNmsMessageFacade.cs index 4799ada7..8f44986f 100644 --- a/src/NMS.AMQP/Provider/Amqp/Message/AmqpNmsMessageFacade.cs +++ b/src/NMS.AMQP/Provider/Amqp/Message/AmqpNmsMessageFacade.cs @@ -35,7 +35,6 @@ public class AmqpNmsMessageFacade : INmsMessageFacade private TimeSpan? amqpTimeToLiveOverride; private IDestination destination; private IDestination replyTo; - private IDestination consumerDestination; private IAmqpConnection connection; private DateTime? syntheticExpiration; private DateTime syntheticDeliveryTime; @@ -133,7 +132,7 @@ public string NMSCorrelationID public IDestination NMSDestination { - get => destination ?? (destination = AmqpDestinationHelper.GetDestination(this, connection, consumerDestination)); + get => destination ?? (destination = AmqpDestinationHelper.GetDestination(this, connection, NMSConsumerDestination)); set { destination = value; @@ -149,10 +148,12 @@ public IDestination NMSDestination } } } + + public IDestination NMSConsumerDestination { get; set; } public IDestination NMSReplyTo { - get => replyTo ?? (replyTo = AmqpDestinationHelper.GetReplyTo(this, connection, consumerDestination)); + get => replyTo ?? (replyTo = AmqpDestinationHelper.GetReplyTo(this, connection, NMSConsumerDestination)); set { replyTo = value; @@ -410,7 +411,7 @@ public virtual void OnSend(TimeSpan producerTtl) /// public virtual void Initialize(IAmqpConsumer consumer, global::Amqp.Message message) { - this.consumerDestination = consumer.Destination; + this.NMSConsumerDestination = consumer.Destination; this.connection = consumer.Connection; Message = message; @@ -487,7 +488,7 @@ public virtual bool HasBody() protected void CopyInto(AmqpNmsMessageFacade target) { target.connection = connection; - target.consumerDestination = consumerDestination; + target.NMSConsumerDestination = NMSConsumerDestination; target.syntheticExpiration = syntheticExpiration; target.syntheticDeliveryTime = syntheticDeliveryTime; target.amqpTimeToLiveOverride = amqpTimeToLiveOverride; diff --git a/test/Apache-NMS-AMQP-Test/Integration/FailoverIntegrationTest.cs b/test/Apache-NMS-AMQP-Test/Integration/FailoverIntegrationTest.cs index 6d53c458..3705eb85 100644 --- a/test/Apache-NMS-AMQP-Test/Integration/FailoverIntegrationTest.cs +++ b/test/Apache-NMS-AMQP-Test/Integration/FailoverIntegrationTest.cs @@ -447,7 +447,7 @@ public void TestFailoverPassthroughOfReleasedSyncSend() DoFailoverPassthroughOfFailingSyncSendTestImpl(new Released()); } - [Test, Timeout(20_000), Ignore("TODO: It should be fixed.")] + [Test, Timeout(20_000)] public void TestFailoverPassthroughOfModifiedFailedSyncSend() { var modified = new Modified() diff --git a/test/Apache-NMS-AMQP-Test/Message/Facade/NmsTestMessageFacade.cs b/test/Apache-NMS-AMQP-Test/Message/Facade/NmsTestMessageFacade.cs index 89b4874c..1654f07e 100644 --- a/test/Apache-NMS-AMQP-Test/Message/Facade/NmsTestMessageFacade.cs +++ b/test/Apache-NMS-AMQP-Test/Message/Facade/NmsTestMessageFacade.cs @@ -54,6 +54,7 @@ public string NMSMessageId public IPrimitiveMap Properties { get; } = new PrimitiveMap(); public string NMSCorrelationID { get; set; } public IDestination NMSDestination { get; set; } + public IDestination NMSConsumerDestination { get; set; } public TimeSpan NMSTimeToLive { get; set; } public MsgPriority NMSPriority { get; set; } public bool NMSRedelivered { get; set; }