Is there a way to configure Acknowledgements with Spring.NET?
In code it looks like this:
var msgQ = new MessageQueue(OrdersQueueName)
{
DefaultPropertiesToSend =
{
AcknowledgeType = AcknowledgeTypes.FullReachQueue |
AcknowledgeTypes.FullReceive,
AdministrationQueue = new MessageQueue(AckQueueName)
}
};
Could it be done with the ProductTemplate? Another way?
For me, this configuration worked:
In this example I mocked the (apparently) relevant parts of the msmq classes.
I use an expression to get a bit-wise comparison on the enum.
If you register the
AcknowledgeTypewith theSpring.Core.TypeResolution.TypeRegistryusingTypeRegistry.RegisterType("AcknowledgeTypes", typeof(AcknowledgeTypes));, the expression further simplifies to:I’ve tested it with the following program, against Spring.NET 1.3.1:
Which outputs: