internal static Message ToKafkaMessage <T>(Guid streamId, string streamNamespace, T singleEvent, Dictionary <string, object> requestContext) { KafkaBatchContainer container = new KafkaBatchContainer(streamId, streamNamespace, singleEvent, requestContext); var rawBytes = SerializationManager.SerializeToByteArray(container); Message message = new Message() { Value = rawBytes }; return(message); }
internal static Message ToKafkaMessage <T>(Guid streamId, string streamNamespace, IEnumerable <T> events, Dictionary <string, object> requestContext) { KafkaBatchContainer container = new KafkaBatchContainer(streamId, streamNamespace, events.Cast <object>().ToList(), requestContext); var rawBytes = SerializationManager.SerializeToByteArray(container); Message message = new Message() { Value = rawBytes }; return(message); }
public Message ToKafkaMessage <T>(Guid streamId, string streamNamespace, T singleEvent, Dictionary <string, object> requestContext) { return(KafkaBatchContainer.ToKafkaMessage(streamId, streamNamespace, singleEvent, requestContext)); }
public Message ToKafkaMessage <T>(Guid streamId, string streamNamespace, IEnumerable <T> events, Dictionary <string, object> requestContext) { return(KafkaBatchContainer.ToKafkaMessage(streamId, streamNamespace, events, requestContext)); }
public Orleans.Streams.IBatchContainer FromKafkaMessage(Message kafkaMessage, long sequenceId) { return(KafkaBatchContainer.FromKafkaMessage(kafkaMessage, sequenceId)); }