Java Code Examples for org.springframework.cloud.stream.messaging.Source#OUTPUT
The following examples show how to use
org.springframework.cloud.stream.messaging.Source#OUTPUT .
These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: spring-cloud File: DataProducer.java License: Apache License 2.0 | 6 votes |
@Bean @InboundChannelAdapter(value = Source.OUTPUT, poller = @Poller(fixedDelay = "10000", maxMessagesPerPoll = "1")) public MessageSource<TimeInfo> timerMessageSource() { return () -> MessageBuilder.withPayload( TimeInfo.builder().time(Long.toString(System.currentTimeMillis())).label(UUID.randomUUID().toString()).build()) .build(); }
Example 2
Source Project: spring-cloud-stream-app-starters File: LoggregatorSourceConfiguration.java License: Apache License 2.0 | 5 votes |
@Bean public LoggregatorMessageSource loggregatorMessageSource( @Qualifier(Source.OUTPUT) MessageChannel source, CloudFoundryClient cloudFoundryClient) { return new LoggregatorMessageSource( this.loggregatorSourceProperties.getApplicationName(), cloudFoundryClient, source); }
Example 3
Source Project: Hands-On-Reactive-Programming-in-Spring-5 File: GitterService.java License: MIT License | 5 votes |
@SneakyThrows @StreamEmitter @Output(Source.OUTPUT) public Flux<MessageResponse> getLatestMessages() { return webClient.get() .uri(GitterUriBuilder.from(gitterProperties.getApi()) .build() .toUri()) .retrieve() .bodyToFlux(MessageResponse.class) .timeout(Duration.ofSeconds(1)) .retryBackoff(Long.MAX_VALUE, Duration.ofMillis(500)); }
Example 4
Source Project: spring-cloud-stream File: CustomPartitionedProducerTest.java License: Apache License 2.0 | 5 votes |
@Bean @InboundChannelAdapter(value = Source.OUTPUT, poller = @Poller(fixedDelay = "5000", maxMessagesPerPoll = "1")) public MessageSource<String> timerMessageSource() { return new MessageSource<String>() { @Override public Message<String> receive() { throw new MessagingException("test"); } }; }
Example 5
Source Project: spring-cloud-stream File: CustomPartitionedProducerTest.java License: Apache License 2.0 | 5 votes |
@Bean @InboundChannelAdapter(value = Source.OUTPUT, poller = @Poller(fixedDelay = "5000", maxMessagesPerPoll = "1")) public MessageSource<String> timerMessageSource() { return new MessageSource<String>() { @Override public Message<String> receive() { throw new MessagingException("test"); } }; }
Example 6
Source Project: microservices-platform File: RocketMqConfig.java License: Apache License 2.0 | 4 votes |
@Output(Source.OUTPUT) MessageChannel output();
Example 7
Source Project: rocketmq-binder-demo File: SimpleTimeSourceApplication.java License: Apache License 2.0 | 4 votes |
@Bean @InboundChannelAdapter(value = Source.OUTPUT, poller = @Poller(fixedDelay = "10000", maxMessagesPerPoll = "1")) public MessageSource<Long> timeMessageSource() { return () -> MessageBuilder.withPayload(new Date().getTime()).build(); }
Example 8
Source Project: event-store-demo File: DomainEventSourceImpl.java License: GNU General Public License v3.0 | 4 votes |
@Publisher( channel = Source.OUTPUT ) public DomainEvent publish( final DomainEvent event ) { return event; }
Example 9
Source Project: Learning-Spring-Boot-2.0-Second-Edition File: CommentController.java License: MIT License | 4 votes |
@StreamEmitter public void emit(@Output(Source.OUTPUT) FluxSender output) { output.send(this.flux); }
Example 10
Source Project: spring-cloud-stream File: StreamListenerMethodSetupOrchestratorTests.java License: Apache License 2.0 | 4 votes |
@Output(Source.OUTPUT) MessageChannel channel3();
Example 11
Source Project: Learning-Spring-Boot-2.0-Second-Edition File: CommentController.java License: MIT License | 4 votes |
@StreamEmitter @Output(Source.OUTPUT) public void emit(FluxSender output) { output.send(this.flux); }
Example 12
Source Project: Learning-Spring-Boot-2.0-Second-Edition File: CommentController.java License: MIT License | 4 votes |
@StreamEmitter @Output(Source.OUTPUT) public void emit(FluxSender output) { output.send(this.flux); }
Example 13
Source Project: schema-evolution-samples File: SensorSource.java License: Apache License 2.0 | 4 votes |
@Bean @InboundChannelAdapter(value = Source.OUTPUT, poller = @Poller(fixedDelay = "${fixedDelay}", maxMessagesPerPoll = "1")) public MessageSource<Sensor> timeSensorSource(){ return () -> new GenericMessage<Sensor>(randomSensor()); }
Example 14
Source Project: Learning-Spring-Boot-2.0-Second-Edition File: CommentController.java License: MIT License | 4 votes |
@StreamEmitter @Output(Source.OUTPUT) public void emit(FluxSender output) { output.send(this.flux); }
Example 15
Source Project: functional-eventsourcing File: PublishChannel.java License: Apache License 2.0 | 4 votes |
@Publisher(channel = Source.OUTPUT) public String send(String payload, @Header UUID uuid) { return payload; }
Example 16
Source Project: Learning-Spring-Boot-2.0-Second-Edition File: CommentController.java License: MIT License | 4 votes |
@StreamEmitter @Output(Source.OUTPUT) public void emit(FluxSender output) { output.send(this.flux); }
Example 17
Source Project: schema-evolution-samples File: SensorSource.java License: Apache License 2.0 | 4 votes |
@Bean @InboundChannelAdapter(value = Source.OUTPUT, poller = @Poller(fixedDelay = "${fixedDelay}", maxMessagesPerPoll = "1")) public MessageSource<Sensor> timeSensorSource(){ return () -> new GenericMessage<Sensor>(randomSensor()); }
Example 18
Source Project: Mastering-Spring-Cloud File: OrderApplication.java License: MIT License | 4 votes |
@Bean @InboundChannelAdapter(value = Source.OUTPUT, poller = @Poller(fixedDelay = "1000", maxMessagesPerPoll = "1")) public MessageSource<Order> ordersSource() { Random r = new Random(); return () -> new GenericMessage<>(new Order(OrderStatus.NEW, (long) r.nextInt(5), Collections.singletonList((long) r.nextInt(10)))); }
Example 19
Source Project: myfeed File: FeedItemSubmitter.java License: Apache License 2.0 | 4 votes |
@Gateway(requestChannel = Source.OUTPUT) void submit(FeedItem feedItem);
Example 20
Source Project: shop File: PublishChannel.java License: Apache License 2.0 | 4 votes |
@Publisher(channel = Source.OUTPUT) public String send(String payload, @Header UUID uuid) { return payload; }