spring-cloud-stream

How can @MessagingGateway be configured with Spring Cloud Stream MessageChannels?

妖精的绣舞 提交于 2019-11-29 10:52:00
I have developed asynchronous Spring Cloud Stream services, and I am trying to develop an edge service that uses @MessagingGateway to provide synchronous access to services that are async by nature. I am currently getting the following stack trace: Caused by: org.springframework.messaging.core.DestinationResolutionException: no output-channel or replyChannel header available at org.springframework.integration.handler.AbstractMessageProducingHandler.sendOutput(AbstractMessageProducingHandler.java:355) at org.springframework.integration.handler.AbstractMessageProducingHandler.produceOutput

Spring boot Test fails saying, Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean

南笙酒味 提交于 2019-11-28 09:45:32
Test Class:- @RunWith(SpringRunner.class) @SpringBootTest(classes = { WebsocketSourceConfiguration.class, WebSocketSourceIntegrationTests.class }, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, properties = { "websocket.path=/some_websocket_path", "websocket.allowedOrigins=*", "spring.cloud.stream.default-binder=kafka" }) public class WebSocketSourceIntegrationTests { private String port = "8080"; @Test public void testWebSocketStreamSource() throws IOException, InterruptedException { StandardWebSocketClient webSocketClient = new StandardWebSocketClient(); ClientWebSocketContainer

Spring cloud stream to support routing messages dynamically

喜欢而已 提交于 2019-11-28 07:11:31
问题 i want to create a common project (using spring cloud stream) to route messages to different (consumer) projects dynamically according to message content. (rabbitmq as the message broker) does spring cloud stream support it? if not, any proposed way to accomplish that? thx 回答1: You can achieve that by setting spring.cloud.stream.dynamicDestinations property to a list of destination names (if you know the name beforehand) or keeping it as empty. The BinderAwareChannelResolver takes care of

Spring boot Test fails saying, Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean

孤街浪徒 提交于 2019-11-26 20:52:50
问题 Test Class:- @RunWith(SpringRunner.class) @SpringBootTest(classes = { WebsocketSourceConfiguration.class, WebSocketSourceIntegrationTests.class }, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, properties = { "websocket.path=/some_websocket_path", "websocket.allowedOrigins=*", "spring.cloud.stream.default-binder=kafka" }) public class WebSocketSourceIntegrationTests { private String port = "8080"; @Test public void testWebSocketStreamSource() throws IOException,