コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 public Message ToKafkaMessage <T>(Guid streamId, string streamNamespace, T singleEvent, Dictionary <string, object> requestContext)
 {
     return(KafkaBatchContainer.ToKafkaMessage(streamId, streamNamespace, singleEvent, requestContext));
 }
コード例 #4
0
 public Message ToKafkaMessage <T>(Guid streamId, string streamNamespace, IEnumerable <T> events, Dictionary <string, object> requestContext)
 {
     return(KafkaBatchContainer.ToKafkaMessage(streamId, streamNamespace, events, requestContext));
 }
コード例 #5
0
 public Orleans.Streams.IBatchContainer FromKafkaMessage(Message kafkaMessage, long sequenceId)
 {
     return(KafkaBatchContainer.FromKafkaMessage(kafkaMessage, sequenceId));
 }