Mark van Renswoude
f8fca5879c
- Compiles, but that's about it. Plenty of ToDo's left before it will run. Beware, ye who enter here. - Cleanup of the internals, with the aim to keep the interface to application code compatible - Added the ability to declare durable queues on startup and update the bindings - Possibly fixed an issue with publish timeouts being logged after a reconnect
27 lines
1.0 KiB
C#
27 lines
1.0 KiB
C#
using Tapeti.Config;
|
|
|
|
namespace Tapeti
|
|
{
|
|
/// <summary>
|
|
/// Provides serialization and deserialization for messages.
|
|
/// </summary>
|
|
public interface IMessageSerializer
|
|
{
|
|
/// <summary>
|
|
/// Serialize a message object instance to a byte array.
|
|
/// </summary>
|
|
/// <param name="message">An instance of a message class</param>
|
|
/// <param name="properties">Writable access to the message properties which will be sent along with the message</param>
|
|
/// <returns>The encoded message</returns>
|
|
byte[] Serialize(object message, IMessageProperties properties);
|
|
|
|
/// <summary>
|
|
/// Deserializes a previously serialized message.
|
|
/// </summary>
|
|
/// <param name="body">The encoded message</param>
|
|
/// <param name="properties">The properties as sent along with the message</param>
|
|
/// <returns>A decoded instance of the message</returns>
|
|
object Deserialize(byte[] body, IMessageProperties properties);
|
|
}
|
|
}
|