Skip to content

Instantly share code, notes, and snippets.

@randomcodenz
Created May 30, 2014 03:44
Show Gist options
  • Save randomcodenz/8e9fb8b54c979d9d4cc3 to your computer and use it in GitHub Desktop.
Save randomcodenz/8e9fb8b54c979d9d4cc3 to your computer and use it in GitHub Desktop.
FuturePublishing and Message Versioning
// Current ScheduleMe message creation ...
var typeName = typeNameSerializer.Serialize( typeof( T ) );
var messageBody = serializer.MessageToBytes( message );
var scheduleMe = new ScheduleMe
{
WakeTime = futurePublishDate,
BindingKey = typeName,
CancellationKey = cancellationKey,
InnerMessage = messageBody
};
return scheduleMe;
// Possible ScheduleMe message creation ...
var serializedMessage = messageSerializationStrategy.SerializeMessage(message);
var messageBody = messageSerializationStrategy.SerializeMessage(serializedMessage);
var scheduleMe = new ScheduleMe
{
WakeTime = futurePublishDate,
BindingKey = typeName,
CancellationKey = cancellationKey,
InnerMessage = messageBody
};
return scheduleMe;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment