/// <inheritdoc/> public async Task <string> StoreCloudEvent(CloudEvent cloudEvent) { cloudEvent.Id = Guid.NewGuid().ToString(); cloudEvent.Time = null; string cloudEventId = await _repository.Create(cloudEvent); PushQueueReceipt receipt = await _queue.PushToQueue(JsonSerializer.Serialize(cloudEvent)); if (!receipt.Success) { _logger.LogError("// EventsService // StoreCloudEvent // Failed to push event {EventId} to queue. Exception {Exception}", cloudEventId, receipt.Exception); } return(cloudEventId); }
/// <inheritdoc/> public async Task <string> StoreCloudEvent(CloudEvent cloudEvent) { cloudEvent.Id = Guid.NewGuid().ToString(); cloudEvent.Time = null; return(await _repository.Create(cloudEvent)); }