spring-integration

Don't ack RabbitMQ messages until IntegrationFlow service activator method returns succesfully?

喜夏-厌秋 提交于 2019-12-13 03:19:43
问题 I have an integration flow defined like this: IntegrationFlows.from(Amqp.inboundAdapter(connectionFactory, "queueName") .id("id") .autoStartup(autoStartup) .concurrentConsumers(2) .maxConcurrentConsumers(3) .messageConverter(messageConverter())) .aggregate(a -> ...) .handle(serviceActivatorBean, "myMethod", e -> e.advice(requestHandlerRetryAdviceForIntegrationFlow())) .get(); Where the serviceActivatorBean is defined like this: @Component @Transactional public class ServiceActivator {

http inbound gateway path url mapping

自古美人都是妖i 提交于 2019-12-13 02:49:45
问题 i have two int-http:inbound-gateway with path as mentioned below.when i call http://localhost:8080/XYZ/ABCService/query -- i expected to call http:inbound-gateway with id ="XYZ" http://localhost:8080/ABCService/query - i expected to call http:inbound-gateway with id ="default" but what happing in its not consistence when i give request to http://localhost:8080/XYZ/ABCService/query it is calling "default" gateway.i understand it because of the path /*Serivce.But i like to know can i give some

Application runtime exceptions are not being sent to errorChannel or ServiceActivator not able to listen on to errorChannel

萝らか妹 提交于 2019-12-13 02:47:36
问题 After listening on a kafka topic using @StreamListener, upon RuntimeException, global erroChannel or topic specific errorChannel (topic.group.errors) not receiving any error message. @ServiceActivator not receiving anything. POM Dependencies : Greenwich.RELEASE <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-stream</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-stream-schema</artifactId> </dependency>

REST API Layer Orchestration using Spring Integration

社会主义新天地 提交于 2019-12-13 02:40:48
问题 We have around 6 individual REST services which we would be calling in our orchestration layer. for example "Calling service-1 to check if a bank account is of certain type, if yes, then call service-2, else call service-3". Is Spring Integration messaging framework is a right tool for orchestrating calls to those services or its an overkill? Please suggest if there is a better way to accomplish the same. 回答1: I can't suggest you better tool, because Spring Integration was the best one for me

Spring integration | Service Activator - Error Channel , Exception handling

早过忘川 提交于 2019-12-13 02:27:08
问题 I have a problem in catching the exceptions in my spring integration application. Flow of operations in my application. Http:inbound gateway which receives the request (error-channel defined to my custom error channel) Service Activator for basic validations (Exceptions which are thrown from here are handled by error-channel defined on the GW) splitter Aggregator Exceptions on my splitter or Aggregator are not handled by my error channel. why? Steps taken: I added a chain and included a

Resttemplate : HttpMessageNotWritableException: No serializer found for class java.io.ByteArrayInputStream

老子叫甜甜 提交于 2019-12-13 02:17:41
问题 Using Spring Integration I upload a file via HTTP POST and route it to a service activator. In the service activator, I make a call using RestTemplate to another server where to dump the file but I can't figure out why I get the following error for the following code: What I don't understand is why I get the exception below when I call RestTemplate.exchange() at pdi.integration.MultipartReceiver.printMultiPartContent(MultipartReceiver.java:41) at sun.reflect.NativeMethodAccessorImpl.invoke0

Durable Subscription ActiveMQ

三世轮回 提交于 2019-12-13 02:06:28
问题 I am trying to put in place durable subscriber for my messages so that they will get persist in topic even after server restart. But during configuration I am getting error related to xml: Here is my configuration xml: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:int="http://www.springframework.org/schema/integration"

Return connection status for TCP adapter with Server Connection factory/Client Connection Factory

强颜欢笑 提交于 2019-12-13 02:01:18
问题 I want to check the status of the TCP Adapter(Client/Server connection factory) whether the adapter is connected or not. This Question is posted in continuation with this Question but with some other issue. After changing the method name : from: isConnected() to isClientModeConnected() I have to change my control Bus Bean definition Earlier no output channel is configured hence its giving error @Bean public IntegrationFlow controlBus() { return IntegrationFlowDefinition::controlBus; } Now,

Spring's DefaultMessageListenerContainer to use connection factory directly from broker or JCA managed?

一笑奈何 提交于 2019-12-13 01:48:01
问题 I have a Spring Integration application, where I have a JMS inbound channel adapter that will receive messages from a queue in a remote JMS broker. I'm looking up the connection factory directly from the broker's remote JNDI service and this is what I use to set up my inbound channel adapter. I understand that behind the scenes there is a DefaultMessageListenerContainer . According to AbstractMessageListenerContainer javadocs, found here, if "sessionTransacted" is set to "true" for the DMLC,

How to rollback message taken from IBM MQ in spring integration

非 Y 不嫁゛ 提交于 2019-12-13 01:32:00
问题 I have a spring integration flow like this: 1) message-driven-channel-adapter -> 1.1) output-channel connected to -> service-activator -> outbound-channel-adapter (for sending response) 1.2) error-channel connected to -> exception-type-router 1.2.1) message is sent to different queues depending on the exception type using outbound-channel-adapter I have set acknowledge="transacted" in message-driven-channel-adapter. I want to introduce rollback for a specific type of exception, after error