public async Task Subscribe(Type eventType, ContextBag context) { var section = topologySectionManager.DetermineResourcesToSubscribeTo(eventType); await topologyCreator.Create(section).ConfigureAwait(false); topologyOperator.Start(section.Entities); }
public async Task CreateQueueIfNecessary(QueueBindings queueBindings, string identity) { if (resourcesCreated) { return; } var internalTopology = topologyCreator as ICreateTopologyInternal; if (internalTopology != null) { await internalTopology.AssertManagedRights().ConfigureAwait(false); } var receiveResources = sections.DetermineResourcesToCreate(queueBindings); await topologyCreator.Create(receiveResources).ConfigureAwait(false); resourcesCreated = true; }