public static ValueTask SaveMessagesAsync(this IMyServiceBusMessagesPersistenceGrpcService grpcService,
                                                  string topicId, MessageContentGrpcModel[] messages, int packetSize)
        {
            var contract = new SaveMessagesGrpcContract
            {
                TopicId  = topicId,
                Messages = messages
            };

            return(grpcService.SaveMessagesAsync(contract.CompressAndSplitAsync(packetSize)));
        }
        public static async IAsyncEnumerable <MessageContentGrpcModel> GetPageAsync(
            this IMyServiceBusMessagesPersistenceGrpcService grpcService, string topicId, long pageNo)
        {
            var requestModel = new GetMessagesPageGrpcRequest
            {
                TopicId = topicId,
                PageNo  = pageNo
            };

            var items = await grpcService.GetPageCompressedAsync(requestModel)
                        .DecompressAndMerge <IEnumerable <MessageContentGrpcModel> >();

            foreach (var itm in items)
            {
                yield return(itm);
            }
        }