private static KafkaMessagePublisher <TData> GetKafkaPublisher <TData>( CloudEventFormat format = CloudEventFormat.Protocol) { var options = new KafkaPublisherOptions <TData> { Topic = KafkaTopic }; return(new KafkaMessagePublisher <TData>(Options.Create(options), new JsonEventFormatter(), Options.Create(new PublisherOptions { CloudEventFormat = format }))); }
private IRawMessagePublisher <string> GetPublisher( IRabbitMQConnectionFactory <string>?factory = null, RabbitMQPublisherOptions <string>?options = null, bool overwriteExchange = false, CloudEventFormat cloudEventFormat = CloudEventFormat.Protocol) { options ??= GetConfig(overwriteExchange); factory ??= GetDefaultConnectionFactoryMock <string>().Object; var optionsMock = Options.Create(options); return(new RabbitMQMessagePublisher <string>( factory, optionsMock, Options.Create(new PublisherOptions { CloudEventFormat = cloudEventFormat }), new JsonEventFormatter() )); }
private NATSMessagePublisher<string> GetPublisher(IOptions<NATSBaseOptions> clientOptions, CloudEventFormat cloudEventFormat = CloudEventFormat.Protocol) { return new NATSMessagePublisher<string>(clientOptions, new NATSClientFactory(), new JsonEventFormatter(), MSOptions.Create(new PublisherOptions { CloudEventFormat = cloudEventFormat })); }
public UnhandledCloudEventFormatException(CloudEventFormat cloudEventFormat) : base($"Unhandled CloudEventFormat {cloudEventFormat}") { }