public Task <ISendTransport> CreatePublishTransport <T>() where T : class { IActiveMqMessagePublishTopology <T> publishTopology = _hostTopology.Publish <T>(); var settings = publishTopology.GetSendSettings(); var sessionContextSupervisor = CreateSessionContextSupervisor(); var configureTopologyFilter = new ConfigureTopologyFilter <SendSettings>(settings, publishTopology.GetBrokerTopology()); return(CreateSendTransport(sessionContextSupervisor, configureTopologyFilter, settings.EntityName, DestinationType.Topic)); }
public Task <ISendTransport> CreatePublishTransport <T>(ISessionContextSupervisor sessionContextSupervisor) where T : class { LogContext.SetCurrentIfNull(_hostConfiguration.LogContext); IActiveMqMessagePublishTopology <T> publishTopology = _topologyConfiguration.Publish.GetMessageTopology <T>(); var settings = publishTopology.GetSendSettings(_hostConfiguration.HostAddress); IPipe <SessionContext> configureTopology = new ConfigureTopologyFilter <SendSettings>(settings, publishTopology.GetBrokerTopology()).ToPipe(); return(CreateSendTransport(sessionContextSupervisor, configureTopology, settings.EntityName, DestinationType.Topic)); }
public Task <ISendTransport> GetPublishTransport <T>(Uri publishAddress) where T : class { IActiveMqMessagePublishTopology <T> publishTopology = _publishTopology.GetMessageTopology <T>(); var sendSettings = publishTopology.GetSendSettings(); IAgent <SessionContext> sessionAgent = GetSessionAgent(); var configureTopologyFilter = new ConfigureTopologyFilter <SendSettings>(sendSettings, publishTopology.GetBrokerTopology()); var sendTransport = new ActiveMqSendTransport(sessionAgent, configureTopologyFilter, sendSettings.EntityName, DestinationType.Topic); sendTransport.Add(sessionAgent); _host.Add(sendTransport); return(Task.FromResult <ISendTransport>(sendTransport)); }