use of org.springframework.rabbit.stream.support.converter.DefaultStreamMessageConverter in project spring-amqp by spring-projects.
the class RabbitStreamTemplate method createOrGetProducer.
private synchronized Producer createOrGetProducer() {
if (this.producer == null) {
ProducerBuilder builder = this.environment.producerBuilder();
builder.stream(this.streamName);
this.producerCustomizer.accept(this.beanName, builder);
this.producer = builder.build();
if (!this.streamConverterSet) {
((DefaultStreamMessageConverter) this.streamConverter).setBuilderSupplier(() -> this.producer.messageBuilder());
}
}
return this.producer;
}
Aggregations