public T Take()
        {
            var request = QueueTakeCodec.EncodeRequest(GetName());
            var result  = Invoke(request, m => QueueTakeCodec.DecodeResponse(m).response);

            return(ToObject <T>(result));
        }
Esempio n. 2
0
        /// <inheritdoc />
        public async Task <T> DequeueAsync()
        {
            var requestMessage  = QueueTakeCodec.EncodeRequest(Name);
            var responseMessage = await Cluster.Messaging.SendToPartitionOwnerAsync(requestMessage, PartitionId).CAF();

            var response = QueueTakeCodec.DecodeResponse(responseMessage).Response;

            return(ToObject <T>(response));
        }