com.solace.spring.cloud.stream.binder.config.SolaceMessageChannelBinderConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-cloud-stream-binder-solace Show documentation
Show all versions of spring-cloud-stream-binder-solace Show documentation
A Spring Cloud Stream Binder implementation using the Solace Java API (JCSMP)
The newest version!
package com.solace.spring.cloud.stream.binder.config;
import com.solace.spring.cloud.stream.binder.SolaceMessageChannelBinder;
import com.solace.spring.cloud.stream.binder.health.SolaceBinderHealthAccessor;
import com.solace.spring.cloud.stream.binder.meter.SolaceMeterAccessor;
import com.solace.spring.cloud.stream.binder.properties.SolaceExtendedBindingProperties;
import com.solace.spring.cloud.stream.binder.provisioning.SolaceEndpointProvisioner;
import com.solace.spring.cloud.stream.binder.tracing.TracingProxy;
import com.solacesystems.jcsmp.Context;
import com.solacesystems.jcsmp.JCSMPSession;
import lombok.RequiredArgsConstructor;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import java.util.Optional;
@RequiredArgsConstructor
@Configuration
@Import(JCSMPSessionConfiguration.class)
@EnableConfigurationProperties({SolaceExtendedBindingProperties.class})
public class SolaceMessageChannelBinderConfiguration {
private final SolaceExtendedBindingProperties solaceExtendedBindingProperties;
private final JCSMPSession jcsmpSession;
private final Context context;
@Bean
SolaceMessageChannelBinder solaceMessageChannelBinder(SolaceEndpointProvisioner solaceEndpointProvisioner,
Optional solaceMeterAccessor,
Optional tracingProxy,
Optional solaceBinderHealthAccessor) {
SolaceMessageChannelBinder binder = new SolaceMessageChannelBinder(jcsmpSession,
context,
solaceEndpointProvisioner,
solaceMeterAccessor,
tracingProxy,
solaceBinderHealthAccessor);
binder.setExtendedBindingProperties(solaceExtendedBindingProperties);
return binder;
}
}