Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/NMS.AMQP/Message/Facade/INmsMessageFacade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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; }
Expand All @@ -40,7 +42,7 @@ public interface INmsMessageFacade
uint GroupSequence { get; set; }
DateTime? Expiration { get; set; }
sbyte? JmsMsgType { get; }

/// <summary>
/// True if this message is tagged as being persistent
/// </summary>
Expand Down
11 changes: 6 additions & 5 deletions src/NMS.AMQP/Provider/Amqp/Message/AmqpNmsMessageFacade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -410,7 +411,7 @@ public virtual void OnSend(TimeSpan producerTtl)
/// </summary>
public virtual void Initialize(IAmqpConsumer consumer, global::Amqp.Message message)
{
this.consumerDestination = consumer.Destination;
this.NMSConsumerDestination = consumer.Destination;
this.connection = consumer.Connection;
Message = message;

Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down