spring-integration

refreshing spring boot properties

醉酒当歌 提交于 2019-12-11 04:01:36
问题 I have a spring integration web application that imports a bunch of properties file like so: <context:property-placeholder location="classpath*:*.properties" /> Now I am converting it to a spring boot application and I am importing the the properties in using the @PropertySource in the config class. I am also looking at the spring cloud config server for a future state project. So my question is this, all of the beans that need to be refreshed when the properties file changes need

Aggregate list based on size

守給你的承諾、 提交于 2019-12-11 04:00:00
问题 I have a list of let's say size 10, I want to aggregate using max size 6. In this case it should work like this: first six messages are aggregated into one message and then right away (without any timeout) the next 4 messages are aggregated into second message. How can I achieve this in spring integration? I tried using releaseStrategy but I can only define in it the max size, and then the messages that are left (4 messages in my case) are waiting in the aggregator for more messages (so the

Generating a reply when using an outbound channel adapter

非 Y 不嫁゛ 提交于 2019-12-11 03:47:48
问题 I have the following simplified spring integration flow: int-ws:inbound-gateway ----> int:transformer ----> int-kafka:outbound-channel-adapter Basically: A web service endpoint is exposed using the int-ws:inbound-gateway Messages from this endpoint are put onto the input channel (the first ---> ) A custom transformer translates the payload JSON format and adds the MESSAGE_KEY header (required for kafka) The message is placed onto the inputToKafka channel (the second ---> ) The int-kafka

Spring integration MQTT publish & subscribe to multiple topics

↘锁芯ラ 提交于 2019-12-11 03:43:56
问题 I am trying to build an application which subscribes to multiple mqtt topics, get the information, process it and form xmls and upon processing trigger an event so that these can be sent to some cloud server and the successful response from there to be sent back to the mqtt channel. <int-mqtt:message-driven-channel-adapter id="mqttAdapter" client-id="${clientId}" url="${brokerUrl}" topics="${topics}" channel="startCase" auto-startup="true" /> <int:channel id="startCase" /> <int:service

Spring Integration: @ServiceActivator is not working

蓝咒 提交于 2019-12-11 03:42:57
问题 I have the following class: @Configuration public class SpringIntegrationTest { @Bean public SimpleWebServiceInboundGateway testInboundGateWay (){ SimpleWebServiceInboundGateway simpleWebServiceInboundGateway = new SimpleWebServiceInboundGateway(); simpleWebServiceInboundGateway.setRequestChannelName("testChannel"); simpleWebServiceInboundGateway.setReplyChannelName("testChannel2"); return simpleWebServiceInboundGateway; } @Bean public MessageChannel testChannel() { return new DirectChannel()

How to send basicAck to inbound adapter after publisher confirm from outbound adapter

久未见 提交于 2019-12-11 03:26:16
问题 We have an inbound channel adapter that receives notifications of an event. The complexity of the consumer's criteria restrict our ability to use a simple routing key to distribute the messages, so the application uses a splitter to send that message to interested subscriber's queues via a direct exchange. We want to use publisher confirms on our outbound channel adapter the ensure delivery to the client queues. We want to wait for the publisher confirm to ack the original message, and if a

spring integration time out clients

被刻印的时光 ゝ 提交于 2019-12-11 03:08:48
问题 My scenario with spring integration is: tens producer that send the data using a custom protocol(size and content) I have to decode this custom protocol and then handler the result. So I tried lots configuration, the best for this moment is the follow: <bean id="serializer" class="com.MySerializerDeserializer" /> <task:executor id="myTaskExecutor" pool-size="5-300" queue-capacity="500000"/> <int-ip:tcp-connection-factory id="serverTcpConFact" type="server" port="5566" using-nio="true" single

How to unmarshall xml using spring integration dsl

泄露秘密 提交于 2019-12-11 03:05:03
问题 I working on spring integration dsl. The requirement is read a xml message from queue, based on message header value, i need to invoke a different service. I was able to fetch the message from queue but unable write code in dsl for unmarshalling the xml message to object. Can someone help & i have my unmarshaller but unable to wire it with dsl IntegrationFlows .from(Jms.inboundGateway(connectionFactory) .destination(someQueue) .configureListenerContainer(spec -> spec.get()

File inbound-channel-adapter spring integration for Multiple Files aggregation into one master File for Job processing

偶尔善良 提交于 2019-12-11 02:45:55
问题 I have written a code to combined multiple files into one single Master file. The issue is with int-transformer where I am getting one file at a time although I have aggregated List of File in composite Filter of File inbound-channel-adapter. The List of File size in composite filter is correct but in Transformer bean the List of File size is always one and not getting the correct list size aggregated file by the filter. Here is my config: <!-- Auto Wiring --> <context:component-scan base

Spring Integration Channel Statistics Metrics

假如想象 提交于 2019-12-11 02:37:13
问题 somehow I dont catch the Spring-Integration Metrics Content. What I want to have is a statistical output about, how many message/second goes through a message channel, what is the min and the max throughput. If I use newTicketChannel.getSendRate() , then I become following output: What is clear to me is N (number of Messages). Mean for me is the number of messages what have been progressed each second (?). But what is totally unclear to me are the values of min and max . I need something like