public Task Forward(IMessageProcessingContext context, string messagePartitionKey)
    {
        if (!knownPartitionKeys.Contains(messagePartitionKey))
        {
            throw new PartitionMappingFailedException($"User mapped key {messagePartitionKey} does not match any known partition key values");
        }

        var destination = addressTranslator(logicalAddress.CreateIndividualizedAddress(messagePartitionKey));

        return(context.ForwardCurrentMessageTo(destination));
    }
Example #2
0
 public Task Handle(object message, IMessageProcessingContext context)
 {
     return(context.ForwardCurrentMessageTo("Samples.SagaMigration.Server.New"));
 }