public static IIntermediarySocket AsIntermediary(this EasyZMqConfigurer configurer, string backendAddress) { var frontendAddressBinder = configurer.AddressBinder; var backendAddressBinder = new BindAddressBinder(new Uri(backendAddress)); return(CreateIntermediarySocket(frontendAddressBinder, backendAddressBinder)); }
public static IPublisherSocket AsPublisher(this EasyZMqConfigurer configurer) { var serializer = configurer.Serializer; var addressBinder = configurer.AddressBinder; var socket = new NetMQ.Sockets.PublisherSocket(); return(new PublisherSocket(serializer, addressBinder, socket)); }
public static IDynamicPublisherSocket AsDynamicPublisher(this EasyZMqConfigurer configurer) { var serializer = new TypeUnawareJsonSerializer(); var addressBinder = configurer.AddressBinder; var socket = new NetMQ.Sockets.PublisherSocket(); return(new PublisherSocket(serializer, addressBinder, socket)); }
public static ISubscriberSocket AsSubscriber(this EasyZMqConfigurer configurer, string topic) { var serializer = configurer.Serializer; var addressBinder = configurer.AddressBinder; var loggerFactory = configurer.LoggerFactory; var messageDispatcher = configurer.MessageDispatcher; var socket = new NetMQ.Sockets.SubscriberSocket(); socket.Subscribe(topic); return(new SubscriberSocket(serializer, addressBinder, loggerFactory, messageDispatcher, socket)); }
public static EasyZMqConfigurer UseLog4Net(this EasyZMqConfigurer configurer) { configurer.Use(new Log4NetLoggerFactory()); return(configurer); }