use of org.springframework.cloud.gcp.pubsub.integration.inbound.PubSubInboundChannelAdapter in project spring-cloud-gcp by spring-cloud.
the class PubSubMessageChannelBinder method createConsumerEndpoint.
@Override
protected MessageProducer createConsumerEndpoint(ConsumerDestination destination, String group, ExtendedConsumerProperties<PubSubConsumerProperties> properties) {
PubSubInboundChannelAdapter adapter = new PubSubInboundChannelAdapter(this.pubSubTemplate, destination.getName());
ErrorInfrastructure errorInfrastructure = registerErrorInfrastructure(destination, group, properties);
adapter.setErrorChannel(errorInfrastructure.getErrorChannel());
adapter.setAckMode(properties.getExtension().getAckMode());
return adapter;
}
use of org.springframework.cloud.gcp.pubsub.integration.inbound.PubSubInboundChannelAdapter in project spring-cloud-gcp by spring-cloud.
the class ReceiverApplication method messageChannelAdapter.
@Bean
public PubSubInboundChannelAdapter messageChannelAdapter(@Qualifier("pubsubInputChannel") MessageChannel inputChannel, PubSubTemplate pubSubTemplate) {
PubSubInboundChannelAdapter adapter = new PubSubInboundChannelAdapter(pubSubTemplate, "exampleSubscription");
adapter.setOutputChannel(inputChannel);
adapter.setAckMode(AckMode.MANUAL);
adapter.setPayloadType(String.class);
return adapter;
}
use of org.springframework.cloud.gcp.pubsub.integration.inbound.PubSubInboundChannelAdapter in project spring-cloud-gcp by spring-cloud.
the class ReceiverApplication method messageChannelAdapter.
@Bean
public PubSubInboundChannelAdapter messageChannelAdapter(@Qualifier("pubsubInputChannel") MessageChannel inputChannel, PubSubOperations pubSubTemplate) {
PubSubInboundChannelAdapter adapter = new PubSubInboundChannelAdapter(pubSubTemplate, "exampleSubscription");
adapter.setOutputChannel(inputChannel);
adapter.setAckMode(AckMode.MANUAL);
return adapter;
}
use of org.springframework.cloud.gcp.pubsub.integration.inbound.PubSubInboundChannelAdapter in project spring-cloud-gcp by spring-cloud.
the class ReceiverConfiguration method messageChannelAdapter.
@Bean
public PubSubInboundChannelAdapter messageChannelAdapter(@Qualifier("pubSubInputChannel") MessageChannel inputChannel, PubSubTemplate pubSubTemplate) {
PubSubInboundChannelAdapter adapter = new PubSubInboundChannelAdapter(pubSubTemplate, SUBSCRIPTION_NAME);
adapter.setOutputChannel(inputChannel);
adapter.setAckMode(AckMode.MANUAL);
adapter.setPayloadType(Person.class);
return adapter;
}
Aggregations