profile
viewpoint

artembilan/bookmarks 1

code to accompany a talk on Microservices

artembilan/disruptor 1

High Performance Inter-Thread Messaging Library

artembilan/AcceptOnceFileFilter-Test 0

Code to test question at http://stackoverflow.com/questions/39604652/acceptoncefilefilter-keeps-other-filters-from-working-in-a-compositefilelistfilt

artembilan/aggregator 0

The Spring Cloud Stream Aggregator Application Starter

artembilan/azure-spring-boot 0

Spring Boot Starters for Azure services

pull request commentpivotal/java-functions

Upgrade to Spring Boot 2.3 M2

You can merge this, but Cassandra is not ready yet. I need a consultation from Spring Data team.

Thanks

artembilan

comment created time in 10 minutes

PR opened pivotal/java-functions

Upgrade to Spring Boot 2.3 M2
  • Upgrade MongoDb functions to the latest supported driver; fix compatibility
  • Upgrade cassandra-consumer to the latest Spring Data and Spring Integration Cassandra
  • Remove redundant options from POMs

NOTE: Cassandra Consumer is not ready yet. We can't create a keyspace any more with the latest Spring Boot

+89 -145

0 comment

15 changed files

pr created time in 11 minutes

create barnchpivotal/java-functions

branch : upgrades

created branch time in 11 minutes

push eventspring-projects/spring-integration

Artem Bilan

commit sha d61a247f4bde5545e8dc1bbfc658f18a9075faeb

Fix ReactiveStreamsConsumer for PollableChannel https://build.spring.io/browse/INT-MASTERSPRING40-985/ * Move `onSubscribe()` callback to the `subscribe()` operator to honor a `request` contract from the target subscriber

view details

push time in 4 hours

issue commentspring-projects/spring-integration

Consider adding Timeout to Webflux.outboundGateway in DSL

OK. Got it!

I wonder if we should consider some more general solution for any possible post-response customization. More over since you say it is "per request", then it might look like this:

BiFunction<Message<?>, Mono<?>, Publisher<?>> responsePostProcessor;

Which is going to be called from the Mono.transform().

This way you can apply a requested timeout() or any other possible operators, e.g. retry() or even further response conversion.

How does that sound for you?

sirimamilla

comment created time in 5 hours

issue commentspring-projects/spring-integration

Priority header not mapped to JMS Message

Yep! Indeed it has to be documented. And I definitely think that "Mapping headers" section is the right way to go.

Thanks for the pointer!

micheljung

comment created time in 6 hours

issue commentspring-projects/spring-integration

MockIntegrationContext.reset() does not behave as expected

Yes, of course we need some logic over there. And since we really talk about resetting we definitely need to have an endpoint in a state it was before resetting, so, yes your first point is correct. I just wanted to let you know that observation is correct and has to be fixed: everything else is implementation details.

And yes, good catch about beans map clean - bug 😄

So, if you are good with all of that don't hesitate to raise a Pull Request and we continue a discussion from the code lines. If that of course.

Thanks

hgarus

comment created time in 6 hours

issue commentspring-projects/spring-integration

MockIntegrationContext.reset() does not behave as expected

@hgarus ,

any thoughts that you can contribute a fix while we are out for President Day today: https://github.com/spring-projects/spring-integration/blob/master/CONTRIBUTING.adoc ?

Thanks

hgarus

comment created time in a day

issue commentspring-projects/spring-integration

MockIntegrationContext.reset() does not behave as expected

Yeah... Confirmed. This is a bug: we have to stop endpoints and start them again to apply replacement. Technically this is the same substituteMessageHandlerFor() but with a handler from internal beans map.

Of course, a workaround is to stop() and start() an endpoint before and after that this.mockIntegrationContext.resetBeans(); call.

hgarus

comment created time in a day

issue commentspring-projects/spring-kafka

Expose valueSerializer and valueDeserializer (and key) as beans.

We don't create. That's exactly a target Apache Kafka API:

KafkaProducer(Map<String, Object> configs, Serializer<K> keySerializer, Serializer<V> valueSerializer)

Therefore we just expose in Spring for Apache Kafka whatever is available for in the target Kafka client implementation. Even if we would be able to expose an API you request, it is still going to be against reflection. Plus consider your situation with that Sleuth proxying. Without a public API in Apache Kafka client, we can't make a reliable public API in Spring for Apache Kafka. Therefore a way Apache Kafka it suggests via ctor arguments for the KafkaProducer instead of configuration properties is the way to go. At least for now.

I mean when you request such a feature in Apache Kafka and it becomes available for any users, we are more than happy to expose such getters in Spring for Apache Kafka. However I believe that one already belongs to DefaultKafkaProducerFactory and DefaultKafkaConsumerFactory if that.

Although I would stay with top-level bean configuration instead of non-transparent instantiation in the Kafka client by reflection from the properties.

sta-szek

comment created time in a day

issue commentspring-projects/spring-kafka

Expose valueSerializer and valueDeserializer (and key) as beans.

The KafkaTemplate is based on the ProducerFactory where its implementation is a DefaultKafkaProducerFactory. And this one has a ctor like this:


	/**
	 * Construct a factory with the provided configuration and {@link Serializer}s.
	 * Also configures a {@link #transactionIdPrefix} as a value from the
	 * {@link ProducerConfig#TRANSACTIONAL_ID_CONFIG} if provided.
	 * This config is going to be overridden with a suffix for target {@link Producer} instance.
	 * @param configs the configuration.
	 * @param keySerializer the key {@link Serializer}.
	 * @param valueSerializer the value {@link Serializer}.
	 */
	public DefaultKafkaProducerFactory(Map<String, Object> configs,
			@Nullable Serializer<K> keySerializer,
			@Nullable Serializer<V> valueSerializer) {

So, you are good to configure your KafkaAvroDeserializer & KafkaAvroSerializer over there and reuse those beans whenever you need with your DB.

You don't need to worry about reflection and we don't need to expose those non-KafkaTemplate options.

Does it make sense to you?

sta-szek

comment created time in a day

issue commentspring-projects/spring-integration

Consider adding Timeout to Webflux.outboundGateway in DSL

The request is not clear. What timeout are you talking about? The Webflux.outboundGateway() in DSL is backed by the WebFluxRequestExecutingMessageHandler and there is no any options to apply for the Mono & Flux.

Please, be more specific what is the use-case and what exactly you would like to have customized.

Also, please, consider do not raise a concern against Java DSL if it really doesn't belong to that high level API. In this case we have to do something in the target WebFluxRequestExecutingMessageHandler or its super class. Then, when we expose that property here, we are good to go with Java DSL fixes. Also don't forget that we have an XML DSL as well which is in support any way.

So, your requests just against DSL are confusing.

Thanks for understanding

sirimamilla

comment created time in a day

push eventspring-projects/spring-integration

Artem Bilan

commit sha 6d936d9774ae775041fcac34bb3371d10b23501c

Fix some Sonar smells

view details

push time in 4 days

push eventspring-projects/spring-integration-kafka

Artem Bilan

commit sha a6f1b8a286b101cbfb9c0f7bf16171bc0c979a61

Upgrade to latest releases * Upgrade to Gradle 6.1.1 * Fix for latest Checkstyle * Fix for latest SI-Kotlin-DSL

view details

push time in 4 days

push eventspring-projects/spring-integration-extensions

Artem Bilan

commit sha 40d94f4dc567c74c5167c296d551fa4f65cdb7a1

Add handle() based on single argument lambda * Upgrade dependencies including Gradle

view details

push time in 4 days

pull request commentspring-projects/spring-integration

[INT-3045] add zeromq support using jeromq

@sbcd90 ,

thank you very much for coming back to us! Yes, we definitely need an integration with ZeroMQ according your and other requests. We are stuck because of lack of resources and knowledge on the matter. But we are open for contribution, so feel free to continue your solution in this PR or start a new one if you feel so!

sbcd90

comment created time in 4 days

issue commentspring-projects/spring-integration

Priority header not mapped to JMS Message

Now I recall the reason: not all JMS providers allow to modify properties like JMSPriority in messages before sending on the client. That might work with ActiveMQ, but definitely might not work with others.

Also pay attention that you have been misled: the MessageHeaders.PRIORITY is not mapped into a setJMSPriority() in that SimpleJmsHeaderMapper because it is not a JMSPriority. See the mentioned logic:

	if (StringUtils.hasText(headerName) && !headerName.startsWith(JmsHeaders.PREFIX)
						&& jmsMessage.getObjectProperty(headerName) == null) {

So, we try to check here a priority property. Meanwhile the real setJMSPriority() is mapped into a JMSPriority. See org.apache.activemq.filter.PropertyExpression for example.

Therefore a summary: or stay with your custom MessageConverter if your JMS provider allows to modify a message, or follow a solution we suggest out-of-the-box: the explicitQosEnabled(true) and respective MessageHeaders.PRIORITY header in the Message<?> you send to this Jms.outboundAdapter().

Does it make sense?

micheljung

comment created time in 4 days

issue commentspring-projects/spring-kafka

Kafka Streams - Problem defining state store by using KafkaStreamsInfrastructureCustomizer

@stijnvanbever,

Please, consider to provide a fix on the matter. Sounds like you are fully on board with the feature and bug popped out from there.

Thank you!

stijnvanbever

comment created time in 4 days

issue commentspring-projects/spring-integration

MQTT should support `setManualAcks`

I guess you talk about this API in the IMqttClient:

	/**
	 * If manualAcks is set to true, then on completion of the messageArrived callback
	 * the MQTT acknowledgements are not sent.  You must call messageArrivedComplete
	 * to send those acknowledgements.  This allows finer control over when the acks are
	 * sent.  The default behaviour, when manualAcks is false, is to send the MQTT
	 * acknowledgements automatically at the successful completion of the messageArrived
	 * callback method.
	 * @param manualAcks if set to true, MQTT acknowledgements are not sent.
	 */
	public void setManualAcks(boolean manualAcks);
	
	/**
	 * Indicate that the application has completed processing the message with id messageId.
	 * This will cause the MQTT acknowledgement to be sent to the server.
	 * @param messageId the MQTT message id to be acknowledged
	 * @param qos the MQTT QoS of the message to be acknowledged
	 * @throws MqttException if there was a problem sending the acknowledgement
	 */
	public void messageArrivedComplete(int messageId, int qos) throws MqttException;

So, we need to consider an AcknowledgmentCallback implementation (together with the AcknowledgmentCallbackFactory) for MQTT. See its implementation for AMQP in the AmqpMessageSource.

Something similar we have in the Spring Integration for Apache Kafka: https://github.com/spring-projects/spring-integration-kafka/blob/master/src/main/java/org/springframework/integration/kafka/inbound/KafkaMessageSource.java#L678

We have to populate an IntegrationMessageHeaderAccessor.ACKNOWLEDGMENT_CALLBACK to let the target app to ack processed messages manually.

@garyrussell , WDYT?

YiuTerran

comment created time in 4 days

pull request commentspring-projects/spring-integration

[INT-3045] add zeromq support using jeromq

@oli-ver ,

Thank you for heads up!

The problem is that I'm not familiar with ZeroMQ at all and this PR is kinda similar to what we have in the MQTT module, so that confuses me a lot. Since there is no any feedback from the author and no one is willing to contribute other way the work is on idle so far...

So, if you have any ideas how to proceed, I'm open for any discussions or just contribution to make such a feature working in Spring Integration, too!

sbcd90

comment created time in 4 days

push eventspring-projects/spring-integration

Artem Bilan

commit sha 236ded9ea1f723049697d4362a4e4d416ac318d0

Upgrade to Lettuce 5.2.2

view details

push time in 5 days

push eventartembilan/spring-integration-extensions

Artem Bilan

commit sha 638a2ff470d16da7c4cf3d5001bf3222b4c84d4a

* Disable test with embedded Cassandra on Windows

view details

push time in 5 days

push eventartembilan/spring-integration-extensions

Artem Bilan

commit sha 9067c8c5eafce1c5f99b24f4db86c46f921fe621

Fix test entity for LocalDate

view details

push time in 5 days

Pull request review commentspring-projects/spring-integration

GH-2818: DSL support for -ws module

+/*+ * Copyright 2020 the original author or authors.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ *      https://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++package org.springframework.integration.ws.dsl;++import java.util.Map;++import org.springframework.expression.Expression;+import org.springframework.integration.dsl.MessageHandlerSpec;+import org.springframework.integration.ws.AbstractWebServiceOutboundGateway;+import org.springframework.integration.ws.SoapHeaderMapper;+import org.springframework.ws.WebServiceMessageFactory;+import org.springframework.ws.client.core.FaultMessageResolver;+import org.springframework.ws.client.core.WebServiceMessageCallback;+import org.springframework.ws.client.core.WebServiceTemplate;+import org.springframework.ws.client.support.interceptor.ClientInterceptor;+import org.springframework.ws.transport.WebServiceMessageSender;++/**+ * The base {@link MessageHandlerSpec} for {@link AbstractWebServiceOutboundGateway}s.+ *+ * @param <S> the target {@link BaseWsOutboundGatewaySpec} implementation type.+ * @param <E> the target {@link AbstractWebServiceOutboundGateway} implementation type.+ *+ * @author Gary Russell+ * @since 5.3+ *+ */+public class BaseWsOutboundGatewaySpec<+		S extends BaseWsOutboundGatewaySpec<S, E>, E extends AbstractWebServiceOutboundGateway>+	extends MessageHandlerSpec<S, E> {++	/**+	 * Configure the header mapper.+	 * @param headerMapper the mapper.+	 * @return the spec.+	 */+	public S headerMapper(SoapHeaderMapper headerMapper) {+		this.target.setHeaderMapper(headerMapper);+		return _this();+	}++	/**+	 * Set the Map of URI variable expressions to evaluate against the outbound message+	 * when replacing the variable placeholders in a URI template.+	 * @param uriVariableExpressions The URI variable expressions.+	 * @return the spec.+	 */+	public S uriVariableExpressions(Map<String, Expression> uriVariableExpressions) {+		this.target.setUriVariableExpressions(uriVariableExpressions);+		return _this();+	}++	/**+	 * Specify whether the URI should be encoded after any <code>uriVariables</code>+	 * are expanded and before sending the request. The default value is <code>true</code>.+	 * @param encodeUri true if the URI should be encoded.+	 * @return the spec.+	 * @see org.springframework.web.util.UriComponentsBuilder+	 */+	public S encodeUri(boolean encodeUri) {

https://github.com/spring-projects/spring-integration/issues/3180

garyrussell

comment created time in 5 days

issue openedspring-projects/spring-integration

Consider to use a DefaultUriBuilderFactory.EncodingMode for the AbstractWebServiceOutboundGateway instead of plain boolean encodeUri

Similar solution exists already for AbstractHttpRequestExecutingMessageHandler. See its setEncodingMode(DefaultUriBuilderFactory.EncodingMode encodingMode)

created time in 5 days

push eventspring-projects/spring-integration

Artem Bilan

commit sha 8c4675aa832744afb7825e581c1b1215e3551ec7

Fix new Sonar smell * Make `adaptPollableChannelToPublisher()` as non-blocking

view details

push time in 5 days

issue commentspring-projects/spring-integration

Resolved parameters not working if annotations are in superclass

Closed as "Works as Designed"

jmaister

comment created time in 5 days

Pull request review commentspring-projects/spring-integration

GH-2818: DSL support for -ws module

+/*+ * Copyright 2020 the original author or authors.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ *      https://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++package org.springframework.integration.ws.dsl;++import org.springframework.integration.ws.SimpleWebServiceOutboundGateway;+import org.springframework.lang.Nullable;+import org.springframework.ws.WebServiceMessage;+import org.springframework.ws.WebServiceMessageFactory;+import org.springframework.ws.client.core.SourceExtractor;+import org.springframework.ws.client.support.destination.DestinationProvider;++/**+ * The spec for a {@link SimpleWebServiceOutboundGateway}.+ *+ * @author Gary Russell+ * @since 5.3+ *+ */+public class SimpleWsOutboundGatewaySpec extends BaseWsOutboundGatewaySpec<+	SimpleWsOutboundGatewaySpec, SimpleWebServiceOutboundGateway> {++	/**+	 * Construct an instance with the provided arguments.+	 * @param destinationProvider the destination provider.+	 */+	protected SimpleWsOutboundGatewaySpec(DestinationProvider destinationProvider) {+		this(destinationProvider, null, null);+	}++	/**+	 * Construct an instance with the provided arguments.+	 * @param destinationProvider the destination provider.+	 * @param sourceExtractor the source extractor.+	 */+	protected SimpleWsOutboundGatewaySpec(DestinationProvider destinationProvider, SourceExtractor<?> sourceExtractor) {+		this(destinationProvider, sourceExtractor, null);+	}++	/**+	 * Construct an instance with the provided arguments.+	 * @param destinationProvider the destination provider.+	 * @param sourceExtractor the source extractor.+	 * @param messageFactory the message factory.+	 */+	protected SimpleWsOutboundGatewaySpec(DestinationProvider destinationProvider,+			@Nullable SourceExtractor<?> sourceExtractor,+			@Nullable WebServiceMessageFactory messageFactory) {++		this.target = new SimpleWebServiceOutboundGateway(destinationProvider, sourceExtractor, messageFactory);+	}++	/**+	 * Construct an instance with the provided arguments.+	 * @param uri the URI.+	 */+	protected SimpleWsOutboundGatewaySpec(String uri) {+		this(uri, null, null);+	}++	/**+	 * Construct an instance with the provided arguments.+	 * @param uri the URI.+	 * @param sourceExtractor the source extractor.+	 */+	protected SimpleWsOutboundGatewaySpec(String uri, SourceExtractor<?> sourceExtractor) {+		this(uri, sourceExtractor, null);+	}++	/**+	 * Construct an instance with the provided arguments.+	 * @param uri the URI.+	 * @param sourceExtractor the source extractor.+	 * @param messageFactory the message factory.+	 */+	protected SimpleWsOutboundGatewaySpec(String uri,

Same here.

We may live with what you have so far, but I wonder if we really can make it more natural builder style way...

garyrussell

comment created time in 5 days

Pull request review commentspring-projects/spring-integration

GH-2818: DSL support for -ws module

+/*+ * Copyright 2020 the original author or authors.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ *      https://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++package org.springframework.integration.ws.dsl;++import org.springframework.integration.ws.MarshallingWebServiceInboundGateway;+import org.springframework.oxm.Marshaller;+import org.springframework.oxm.Unmarshaller;++/**+ * The spec for a {@link MarshallingWebServiceInboundGateway}.+ *+ * @author Gary Russell+ * @since 5.3+ *+ */+public class MarshallingWsInboundGatewaySpec extends BaseWsInboundGatewaySpec<MarshallingWsInboundGatewaySpec,+	MarshallingWebServiceInboundGateway> {++	protected MarshallingWsInboundGatewaySpec() {+		super(new MarshallingWebServiceInboundGateway());+	}++	/**+	 * Construct an instance with the provided {@link Marshaller} (which must also implement+	 * {@link Unmarshaller}).+	 * @param marshaller the marshaller.+	 */+	protected MarshallingWsInboundGatewaySpec(Marshaller marshaller) {+		super(new MarshallingWebServiceInboundGateway(marshaller));+	}++	/**+	 * Construct an instance with the provided arguments.+	 * @param marshaller the marshaller.+	 * @param unmarshaller the unmarshaller.+	 */+	protected MarshallingWsInboundGatewaySpec(Marshaller marshaller, Unmarshaller unmarshaller) {

I wouldn't expose two of these ctors since it feels much natural just to call those configuration options...

garyrussell

comment created time in 5 days

Pull request review commentspring-projects/spring-integration

GH-2818: DSL support for -ws module

+/*+ * Copyright 2020 the original author or authors.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ *      https://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++package org.springframework.integration.ws.dsl;++import org.springframework.integration.ws.MarshallingWebServiceOutboundGateway;+import org.springframework.lang.Nullable;+import org.springframework.oxm.Marshaller;+import org.springframework.oxm.Unmarshaller;+import org.springframework.ws.WebServiceMessageFactory;+import org.springframework.ws.client.support.destination.DestinationProvider;++/**+ * The spec for a {@link MarshallingWebServiceOutboundGateway}.+ *+ * @author Gary Russell+ * @since 5.3+ *+ */+public class MarshallingWsOutboundGatewaySpec extends BaseWsOutboundGatewaySpec<+	MarshallingWsOutboundGatewaySpec, MarshallingWebServiceOutboundGateway> {++	/**+	 * Construct an instance with the provided arguments.+	 * @param destinationProvider the destination provider.+	 * @param marshaller the marshaller.+	 */+	protected MarshallingWsOutboundGatewaySpec(DestinationProvider destinationProvider, Marshaller marshaller) {+		this(destinationProvider, marshaller, null, null);+	}++	/**+	 * Construct an instance with the provided arguments.+	 * @param destinationProvider the destination provider.+	 * @param marshaller the marshaller.+	 * @param unmarshaller the unmarshaller.+	 */+	protected MarshallingWsOutboundGatewaySpec(DestinationProvider destinationProvider, Marshaller marshaller,+			Unmarshaller unmarshaller) {+		this(destinationProvider, marshaller, unmarshaller, null);+	}++	/**+	 * Construct an instance with the provided arguments.+	 * @param destinationProvider the destination provider.+	 * @param marshaller the marshaller.+	 * @param messageFactory the message factory.+	 */+	protected MarshallingWsOutboundGatewaySpec(DestinationProvider destinationProvider, Marshaller marshaller,+			WebServiceMessageFactory messageFactory) {++		this(destinationProvider, marshaller, null, messageFactory);+	}++	/**+	 * Construct an instance with the provided arguments.+	 * @param destinationProvider the destination provider.+	 * @param marshaller the marshaller.+	 * @param unmarshaller the unmarshaller.+	 * @param messageFactory the message factory.+	 */+	protected MarshallingWsOutboundGatewaySpec(DestinationProvider destinationProvider,+			@Nullable Marshaller marshaller, @Nullable Unmarshaller unmarshaller,+			WebServiceMessageFactory messageFactory) {++		this.target = new MarshallingWebServiceOutboundGateway(destinationProvider, marshaller, unmarshaller,+				messageFactory);+	}++	/**+	 * Construct an instance with the provided arguments.+	 * @param uri the URI.+	 * @param marshaller the marshaller.+	 */+	protected MarshallingWsOutboundGatewaySpec(String uri, Marshaller marshaller) {+		this(uri, marshaller, (WebServiceMessageFactory) null);+	}++	/**+	 * Construct an instance with the provided arguments.+	 * @param uri the URI.+	 * @param marshaller the marshaller.+	 * @param messageFactory the message factory.+	 */+	protected MarshallingWsOutboundGatewaySpec(String uri, Marshaller marshaller,+			WebServiceMessageFactory messageFactory) {++		this(uri, marshaller, null, messageFactory);+	}++	/**+	 * Construct an instance with the provided arguments.+	 * @param uri the URI.+	 * @param marshaller the marshaller.+	 * @param unmarshaller the unmarshaller.+	 */+	protected MarshallingWsOutboundGatewaySpec(String uri, Marshaller marshaller, Unmarshaller unmarshaller) {+		this(uri, marshaller, unmarshaller, null);+	}++	/**+	 * Construct an instance with the provided arguments.+	 * @param uri the URI.+	 * @param marshaller the marshaller.+	 * @param unmarshaller the unmarshaller.+	 * @param messageFactory the message factory.+	 */+	protected MarshallingWsOutboundGatewaySpec(String uri,

I think we need to consider to have all of these ctors spreaded as options and build the final MarshallingWebServiceOutboundGateway in the doGet(). If possible, of course...

Otherwise it doesn't look too useful to have such a DSL spec based only on ctors

garyrussell

comment created time in 5 days

Pull request review commentspring-projects/spring-integration

GH-2818: DSL support for -ws module

+/*+ * Copyright 2020 the original author or authors.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ *      https://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++package org.springframework.integration.ws.dsl;++import java.util.Map;++import org.springframework.expression.Expression;+import org.springframework.integration.dsl.MessageHandlerSpec;+import org.springframework.integration.ws.AbstractWebServiceOutboundGateway;+import org.springframework.integration.ws.SoapHeaderMapper;+import org.springframework.ws.WebServiceMessageFactory;+import org.springframework.ws.client.core.FaultMessageResolver;+import org.springframework.ws.client.core.WebServiceMessageCallback;+import org.springframework.ws.client.core.WebServiceTemplate;+import org.springframework.ws.client.support.interceptor.ClientInterceptor;+import org.springframework.ws.transport.WebServiceMessageSender;++/**+ * The base {@link MessageHandlerSpec} for {@link AbstractWebServiceOutboundGateway}s.+ *+ * @param <S> the target {@link BaseWsOutboundGatewaySpec} implementation type.+ * @param <E> the target {@link AbstractWebServiceOutboundGateway} implementation type.+ *+ * @author Gary Russell+ * @since 5.3+ *+ */+public class BaseWsOutboundGatewaySpec<+		S extends BaseWsOutboundGatewaySpec<S, E>, E extends AbstractWebServiceOutboundGateway>+	extends MessageHandlerSpec<S, E> {++	/**+	 * Configure the header mapper.+	 * @param headerMapper the mapper.+	 * @return the spec.+	 */+	public S headerMapper(SoapHeaderMapper headerMapper) {+		this.target.setHeaderMapper(headerMapper);+		return _this();+	}++	/**+	 * Set the Map of URI variable expressions to evaluate against the outbound message+	 * when replacing the variable placeholders in a URI template.+	 * @param uriVariableExpressions The URI variable expressions.+	 * @return the spec.+	 */+	public S uriVariableExpressions(Map<String, Expression> uriVariableExpressions) {+		this.target.setUriVariableExpressions(uriVariableExpressions);+		return _this();+	}++	/**+	 * Specify whether the URI should be encoded after any <code>uriVariables</code>+	 * are expanded and before sending the request. The default value is <code>true</code>.+	 * @param encodeUri true if the URI should be encoded.+	 * @return the spec.+	 * @see org.springframework.web.util.UriComponentsBuilder+	 */+	public S encodeUri(boolean encodeUri) {

Hm. Looks like we need to consider to support an EncodingMode instead. Similar to what we have now in HTTP and WebFlux.

Different issue though

garyrussell

comment created time in 5 days

Pull request review commentspring-projects/spring-integration

GH-2818: DSL support for -ws module

 public void setFaultMessageResolver(FaultMessageResolver faultMessageResolver) { 		this.webServiceTemplate.setFaultMessageResolver(faultMessageResolver); 	} +	/**+	 * Specify the {@link WebServiceMessageSender} to use.+	 * @param messageSender the sender.+	 * @deprecated in favor of {@link #setMessageSenders(WebServiceMessageSender...)}+	 */+	@Deprecated 	public void setMessageSender(WebServiceMessageSender messageSender) { 		Assert.state(!this.webServiceTemplateExplicitlySet,

Would you mind to change logic then in favor of calling a replacing API instead? Then it is going to be much easier to support possible changes in the target logic afterward.

garyrussell

comment created time in 5 days

issue commentspring-projects/spring-integration

Priority header not mapped to JMS Message

We do map priority in Spring Integration with slightly different approach:

if (this.jmsTemplate instanceof DynamicJmsTemplate && this.jmsTemplate.isExplicitQosEnabled()) {
			Integer priority = StaticMessageHeaderAccessor.getPriority(message);
			if (priority != null) {
				DynamicJmsTemplateProperties.setPriority(priority);
			}

See JmsSendingMessageHandler. It is supplied with the DynamicJmsTemplate which has this code:

	public int getPriority() {
		Integer priority = DynamicJmsTemplateProperties.getPriority();
		if (priority == null) {
			return super.getPriority();
		}
		Assert.isTrue(priority >= 0 && priority <= 9, "JMS priority must be in the range of 0-9");
		return priority;
	}

So, consider to enable explicitQosEnabled(true) in that configureJmsTemplate().

micheljung

comment created time in 5 days

issue commentspring-projects/spring-integration

Resolved parameters not working if annotations are in superclass

Yeah... Unfortunately, you don't compare apples with apples. The MessagingGateway is fully based on the interfaces and it is exactly its feature to build a logic on the annotations from the interface methods and their parameters. There is really just no any implementation of the provided interface, so we do processing only from the interface. And behavior is exactly opposite: you say with that interface what to build when you call such a method before sending a message. With a ServiceActivator a logic is fully opposite: the framework call your method implementation and we really need an info for building arguments from the method signature.

Sorry, but I have to reject your argument because it doesn't fit to a subject we discuss here. And I fully believe that we need to rely on exact method to call, not its super state. So, for the proper logic it is recommended to provide parameter annotations on the exact implementation. That's what I see here and everywhere else in Spring projects where the framework calls target project methods.

jmaister

comment created time in 5 days

issue commentspring-projects/spring-integration

Resolved parameters not working if annotations are in superclass

Well, what I see it is implemented as a custom logic for Spring MVC and only for interfaces:

	@Override
		public Annotation[] getParameterAnnotations() {
			Annotation[] anns = this.combinedAnnotations;
			if (anns == null) {
				anns = super.getParameterAnnotations();
				int index = getParameterIndex();
				if (index >= 0) {
					for (Annotation[][] ifcAnns : getInterfaceParameterAnnotations()) {
						if (index < ifcAnns.length) {
							Annotation[] paramAnns = ifcAnns[index];
							if (paramAnns.length > 0) {
								List<Annotation> merged = new ArrayList<>(anns.length + paramAnns.length);
								merged.addAll(Arrays.asList(anns));
								for (Annotation paramAnn : paramAnns) {
									boolean existingType = false;
									for (Annotation ann : anns) {
										if (ann.annotationType() == paramAnn.annotationType()) {
											existingType = true;
											break;
										}
									}
									if (!existingType) {
										merged.add(adaptAnnotation(paramAnn));
									}
								}
								anns = merged.toArray(new Annotation[0]);
							}
						}
					}
				}
				this.combinedAnnotations = anns;
			}
			return anns;
		}

See org.springframework.web.method.HandlerMethod.HandlerMethodParameter in spring-web. It is not implemented for super classes and not in spring-messaging. So, I would say we have to stick with an existing behavior to make it as explicit in parameter parts as possible. Plus it will be consistent everywhere in Spring where we deal with messages.

jmaister

comment created time in 6 days

release spring-projects/spring-integration

v5.3.0.M2

released time in 6 days

startedsheunglaili/spring-cloud-stream-binder-mqtt

started time in 6 days

push eventspring-projects/spring-integration

Artem Bilan

commit sha 5273203e33347ef0cb3819ee4d931af3d622fd6d

Upgrade dependencies; prepare for release

view details

push time in 6 days

push eventspring-projects/spring-integration

Artem Bilan

commit sha a0cdfd90ee829b94c8fdd1b7c956616f7fdec836

Change adaptPollableChannelToPublisher to Mono We can use a `Mono.fromCallable()` in combination with `repeat()` instead of possible race condition deal in the `Flux.create()`

view details

push time in 6 days

issue commentspring-projects/spring-integration

Resolved parameters not working if annotations are in superclass

It cannot be treated as a bug because we never advertised such a feature with interfaces. So, you should follow and existing behavior for some time, while I'm gathering more information what and how we support in other Spring projects. I don't close the issue because it sounds reasonable, but at the same time I can't promise a solution if it cannot be possible with our annotation processing.

jmaister

comment created time in 6 days

issue commentspring-projects/spring-integration

Java DSL for web services

Well, while I’m sleeping, please, consider my suggestion above regarding contribution. I mean if you strongly need it, please, consider to provide a solution. It is not so hard to follow similar implementations for HTTP or WebFlux. Otherwise I’ll come back to this somewhere next week.

Thanks for understanding!

afattahi54

comment created time in 7 days

pull request commentspring-projects/spring-integration

GH-3175: Add .scanner() to inbound file sync spec

... and cherry-picked to 5.2.x

garyrussell

comment created time in 7 days

push eventspring-projects/spring-integration

Gary Russell

commit sha 2e409aa599d5e1545d93d4f7c6c34a51c64ce615

GH-3175: Add .scanner() to inbound file sync spec Resolves https://github.com/spring-projects/spring-integration/issues/3175 * Fix `@since` for backport **Cherry-pick to `5.2.x`** (cherry picked from commit 1ff69d4d2424879ff40be6284686897bcc579a0f)

view details

push time in 7 days

push eventspring-projects/spring-integration

Gary Russell

commit sha 1ff69d4d2424879ff40be6284686897bcc579a0f

GH-3175: Add .scanner() to inbound file sync spec Resolves https://github.com/spring-projects/spring-integration/issues/3175 * Fix `@since` for backport **Cherry-pick to `5.2.x`**

view details

push time in 7 days

PR merged spring-projects/spring-integration

GH-3175: Add .scanner() to inbound file sync spec

Resolves https://github.com/spring-projects/spring-integration/issues/3175

+25 -2

0 comment

2 changed files

garyrussell

pr closed time in 7 days

issue closedspring-projects/spring-integration

Add .scanner to RemoteFileInboundChannelAdapterSpec

https://stackoverflow.com/questions/60159434/spring-sftp-adapter-inboundadapter-with-rotatingserveradvice-getting-full-path/60160306#comment106431056_60160306

closed time in 7 days

garyrussell

delete branch artembilan/spring-integration

delete branch : test_fixes

delete time in 7 days

push eventspring-projects/spring-integration

Artem Bilan

commit sha ede9528c19e519befb90d49055456da7470b3e55

Fix some tests for not closed application context

view details

push time in 7 days

create barnchartembilan/spring-integration

branch : test_fixes

created branch time in 7 days

startedspring-cloud/spring-cloud-stream-samples

started time in 7 days

push eventspring-projects/spring-integration

Artem Bilan

commit sha 7009f9a5f67af82b1d98e8bfda34a6120090f935

Fix new Sonar smells

view details

push time in 7 days

push eventspring-projects/spring-integration

Artem Bilan

commit sha a8c471c06174b0089df759b13ee6ec64bb6b8185

Fix ReactiveStreamsConsumer for error handling To support `onErrorContinue()` logic for the plain `Subscriber` we need to wrap its `onNext()` into a `try..catch` and respective `errorHandler` in the `ReactiveStreamsConsumer`

view details

push time in 8 days

push eventspring-projects/spring-integration

Artem Bilan

commit sha 6591ce90f67bdf66e91426e59197cc5c59c3d887

Fix ReactiveStreamsConsumer for plain subscriber https://build.spring.io/browse/INT-MASTERSPRING40-978 Investigate a behaviour for `ReactiveStreamsConsumer` when we use a plain `Subscriber` directly instead of `doOn...` callbacks. It looks like there is some race condition when the data can be consumed upstream, but there is no consumer downstream ready yet

view details

push time in 8 days

pull request commentspring-projects/spring-integration

GH-3168: Fix FtpSession warning on logout

@jonforums,

FYI if you wish to review.

Thanks

artembilan

comment created time in 8 days

PR opened spring-projects/spring-integration

GH-3168: Fix FtpSession warning on logout

Fixes https://github.com/spring-projects/spring-integration/issues/3168

  • Call this.client.noop() instead of this.client.isConnected() to really check that client has a live connection with the server before calling a this.client.logout()
  • Wrap this.client.logout() into a try..catch to be sure that we wil call a this.client.disconnect() even if logout() fails for some reason.
  • Change WARN logs about Session.close() into a DEBUG level - when we have a problem with closing session because of server disconnect reason we have no any control to do with a situation

Cherry-pick to 5.2.x

<!-- Thanks for contributing to Spring Integration. Please provide a brief description of your pull-request and reference any related issue numbers (prefix references with #).

See the Contributor Guidelines for more information. -->

+23 -9

0 comment

2 changed files

pr created time in 8 days

create barnchartembilan/spring-integration

branch : GH-3168

created branch time in 8 days

push eventspring-projects/spring-integration

Gary Russell

commit sha 538cfe48684205f3f71e9cd928dc26bcd298d860

GH-3172: Support consumer-side batching Resolves https://github.com/spring-projects/spring-integration/issues/3172 When the listener container supports creating batches of consumed messages, present the batch as the message payload - either a `List<Message<?>>` or `List<SomePayload>`. * Add 'since' to new method.

view details

push time in 8 days

PR merged spring-projects/spring-integration

GH-3172: Support consumer-side batching

Resolves https://github.com/spring-projects/spring-integration/issues/3172

When the listener container supports creating batches of consumed messages, present the batch as the message payload - either a List<Message<?>> or List<SomePayload>.

+525 -39

0 comment

14 changed files

garyrussell

pr closed time in 8 days

issue closedspring-projects/spring-integration

Add support for AMQP Consumer-side batch creation

See https://github.com/spring-projects/spring-amqp/issues/1032

Add a ChannelAwareBatchMessageListener and map List<Message> to List<?>.

In preparation for https://github.com/spring-cloud/spring-cloud-stream-binder-rabbit/issues/209

In order to get efficiency on the producer side we need to enable batching on the consumer side, even when the upstream producer doesn't send messages in a batch.

closed time in 8 days

garyrussell

pull request commentspring-projects/spring-kafka

2.3.x

Have we agreed that we are going to back-port it? Is there any problem that we can't cherry-pick your existing PR #1380 ?

Thanks

pawellozinski

comment created time in 8 days

Pull request review commentspring-projects/spring-kafka

Make ZK client timeouts configurable

 public void setZkPort(int zkPort) { 		this.zkPort = zkPort; 	} +	/**+	 * Set timeouts for the client to the embedded Zookeeper.+	 * @param zkConnectionTimeout the connection timeout,+	 * @param zkSessionTimeout the session timeout.+	 * @return the {@link EmbeddedKafkaBroker}.+	 */+	public EmbeddedKafkaBroker setZkClientTimeouts(int zkConnectionTimeout, int zkSessionTimeout) {

This is not good. All the setters has to follow Java Beans convention. So, please, make separate setters for these options.

Or if we talk about builder API, then it cannot be with a set prefix. Anyway I'd prefer to have these properties to be configured separately.

pawellozinski

comment created time in 8 days

issue closedspring-projects/spring-retry

RetryTemplate with TimeoutRetryPolicy does not execute first attempt

Hello, I just started diving into spring-retry and it is awesome I found some unexpected behavior that might not be a real problem but I wanted to share it anyway. I have a RetryTemplate with a TimeoutRetryPolicy and BackoffPolicy. When I set both policies to 1 millis the operation sometimes doesn't execute. I see in the javadoc that the timer starts when open is called but I'm wondering when the check happens. I am setting these to 1 millis for unit tests so I know the operation happens at least one time. It seems that the operation should always happen at least one time before timing out. Either way thanks for the great library!

closed time in 8 days

moaxcp

issue commentspring-projects/spring-retry

RetryTemplate with TimeoutRetryPolicy does not execute first attempt

Good. So, closing as "Works as Desiged".

Anything else is already out of this issue scope.

moaxcp

comment created time in 8 days

Pull request review commentspring-projects/spring-integration

GH-3172: Support consumer-side batching

 public static ListenerExecutionFailedException errorMessagePayload(Message messa 			Channel channel, boolean isManualAck, Exception ex) {  		return isManualAck-				? new ManualAckListenerExecutionFailedException(LEFE_MESSAGE, ex, message, channel,-						message.getMessageProperties().getDeliveryTag())+				? new ManualAckListenerExecutionFailedException(LEFE_MESSAGE, ex, channel,+						message.getMessageProperties().getDeliveryTag(), message) 				: new ListenerExecutionFailedException(LEFE_MESSAGE, ex, message); 	} +	/**+	 * Return an {@link ListenerExecutionFailedException} or a {@link ManualAckListenerExecutionFailedException}+	 * depending on whether isManualAck is false or true.+	 * @param messages the failed messages.+	 * @param channel the channel.+	 * @param isManualAck true if the container uses manual acknowledgment.+	 * @param ex the exception.+	 * @return the exception.

@since 5.3? Because of new public API

garyrussell

comment created time in 11 days

Pull request review commentspring-projects/spring-integration

GH-3172: Support consumer-side batching

 ext { 	rsocketVersion = '1.0.0-RC6' 	servletApiVersion = '4.0.1' 	smackVersion = '4.3.4'-	springAmqpVersion = project.hasProperty('springAmqpVersion') ? project.springAmqpVersion : '2.2.3.RELEASE'+	springAmqpVersion = project.hasProperty('springAmqpVersion') ? project.springAmqpVersion : '2.2.4.BUILD-SNAPSHOT'

Or you will move Spring AMQP 2.2.4 release to February 12th: https://github.com/spring-projects/spring-integration/milestone/23.

Or this PR will be placed on hold until February 26th.

But we can't release the next Spring Integration milestone without proper dependencies.

Thanks for understanding.

garyrussell

comment created time in 11 days

push eventspring-projects/spring-amqp

Gary Russell

commit sha fdda7a9bd43ce21e6107c823e1bcc6b48b593e8f

Move Batch Listener check to start() - SI adds the listener after Spring has called APS

view details

push time in 11 days

PR merged spring-projects/spring-amqp

Move Batch Listener check to start()
  • SI adds the listener after Spring has called APS
+3 -3

0 comment

1 changed file

garyrussell

pr closed time in 11 days

pull request commentspring-projects/spring-integration

GH-3155: Add support for Java DSL extensions

and can be merged

So, @garyrussell , the final decision is up to you 😉

artembilan

comment created time in 11 days

push eventartembilan/spring-integration

Artem Bilan

commit sha 5ce41b88b82cdadaf493375de78e3873c29b795d

* Add `protected` to one more `JmsPollableMessageChannelSpec` ctor

view details

push time in 11 days

pull request commentspring-projects/spring-integration

GH-3155: Add support for Java DSL extensions

This will help in doing any further enhancements to the GatewayMessageHandler.

That's abusing a purpose of all the components we have out-of-the-box. It is not preserving, it is some hybrid I'd like to avoid. You feel free to do such a "hell" in your own project, but I'm not going to encourage all users of our project to follow your idea on the matter. Again: such a "selective gateway" can be implemented with existing components in some separate flow which could be referenced from other flows.

Sorry not accepting your request, but I'm fully against some hybrids when go beyond EIP catalog.

The JmsPollableMessageChannelSpec feedback is accepted 😄

artembilan

comment created time in 11 days

issue commentspring-projects/spring-integration

Another "FtpSession - failed to disconnect FTPClient"

Got it!

I'll ping you for PR review.

Or let me know if you are good with contributing the fix: https://github.com/spring-projects/spring-integration/blob/master/CONTRIBUTING.adoc

jonforums

comment created time in 11 days

push eventspring-projects/spring-amqp

Gary Russell

commit sha 667a738051b46053ea0dc10713093b1ef2decba3

Add isConsumerBatchEnabled() to listener container In preparation for https://github.com/spring-projects/spring-integration/issues/3172 Allow the inbound endpoint to detect if its listener container is configured to return batches.

view details

push time in 11 days

PR merged spring-projects/spring-amqp

Add isConsumerBatchEnabled() to listener container

In preparation for https://github.com/spring-projects/spring-integration/issues/3172

Allow the inbound endpoint to detect if its listener container is configured to return batches.

+19 -3

0 comment

3 changed files

garyrussell

pr closed time in 11 days

issue commentspring-projects/spring-integration

Another "FtpSession - failed to disconnect FTPClient"

So, therefore there is no difference between those versions and we are good to go with noop() around logout() instead of isConnected()?

Or should we treat this as "Works as Designed" and close respectively?

What I see that you confirm that there is no regression and behavior is the same.

jonforums

comment created time in 11 days

push eventartembilan/spring-integration

Artem Bilan

commit sha f2e9d63bb061205e0c40be6e66ea3ad4aba8050c

* Add `protected` to one more `GatewayEndpointSpec` ctor * Add JavaDocs to `GatewayEndpointSpec` methods

view details

push time in 11 days

pull request commentspring-projects/spring-integration

GH-3155: Add support for Java DSL extensions

So extension classes will be able to extend the handler.

I don't think so. That GatewayMessageHandler has a restricted responsibility to handle mid-flow requests. Nothing more. I definitely not sure to what you can extend it. But with the custom GatewayMessageHandler you are feel free to implement a custom ConsumerEndpointSpec on the matter similar to that GatewayEndpointSpec.

We talked about options to increase - the new component requires new contract and, therefore, new Spec. However with a new MessageHandler you might even don't need new spec - the .handle() fully covers you.

Please, elaborate more what is your goal to be able to extend that GatewayMessageHandler and therefore GatewayEndpointSpec?

artembilan

comment created time in 11 days

push eventspring-projects/spring-integration

Artem Bilan

commit sha 1bd9954a761fa73eed69436befe30ab3d90606ee

Fix NPE in the DefaultSessionFactoryLocator **Cherry-pick to 5.2.x** (cherry picked from commit 00b771d8a8f83cf9bf9fdbe1cf4eb190c0786dd7)

view details

push time in 11 days

push eventspring-projects/spring-integration

Artem Bilan

commit sha 00b771d8a8f83cf9bf9fdbe1cf4eb190c0786dd7

Fix NPE in the DefaultSessionFactoryLocator **Cherry-pick to 5.2.x**

view details

push time in 11 days

pull request commentspring-projects/spring-integration

GH-3155: Add support for Java DSL extensions

GatewayEndpointSpec(String requestChannel) can be made protected as well

Good catch! Thank you! Anything else ? 😉

artembilan

comment created time in 11 days

PR closed spring-projects/spring-integration

spring-projectsGH-3169: Fix DefaultSessionFactoryLocator addSessionFactory key's type from String to Objec

spring-projectsGH-3169: Fix DefaultSessionFactoryLocator addSessionFactory key's type from String to Object

All other DefaultSessionFactoryLocator contracts are based on the Object, so this addSessionFactory has to be on Object as well.

+12 -0

1 comment

1 changed file

kezhevatov

pr closed time in 11 days

pull request commentspring-projects/spring-integration

spring-projectsGH-3169: Fix DefaultSessionFactoryLocator addSessionFactory key's type from String to Objec

Merged as https://github.com/spring-projects/spring-integration/commit/edf84a393d4dd8f5db8de0d0fdba581be86efa50 and cherry-picked to 5.2.x.

@kezhevatov ,

thank you for the contribution; looking forward for more!

For the future, please, consider to test the project against your changes: you have missed to fix a deprecated method usage in the DelegatingSessionFactoryTests.

Plus it would be great to make a good commit message (not a PR description, but commit): https://chris.beams.io/posts/git-commit/

kezhevatov

comment created time in 11 days

push eventspring-projects/spring-integration

Andrey Kezhevatov

commit sha b75170403bac3218281bad397393ce32662deaf6

GH-3169: DSFL: addSessionFactory based on Object Fixes https://github.com/spring-projects/spring-integration/issues/3169 All other `DefaultSessionFactoryLocator` contracts are based on the `Object`, so this `addSessionFactor`y has to be on `Object` as well. * Add `DefaultSessionFactoryLocator.addSessionFactory(Object key, SessionFactory<F> factory)` * Deprecate existing one based on `String` * Fix tests do no use a deprecated API * Some other code style clean up in the affected classes **Cherry-pick to 5.2.x** (cherry picked from commit edf84a393d4dd8f5db8de0d0fdba581be86efa50)

view details

push time in 11 days

push eventspring-projects/spring-integration

Andrey Kezhevatov

commit sha edf84a393d4dd8f5db8de0d0fdba581be86efa50

GH-3169: DSFL: addSessionFactory based on Object Fixes https://github.com/spring-projects/spring-integration/issues/3169 All other `DefaultSessionFactoryLocator` contracts are based on the `Object`, so this `addSessionFactor`y has to be on `Object` as well. * Add `DefaultSessionFactoryLocator.addSessionFactory(Object key, SessionFactory<F> factory)` * Deprecate existing one based on `String` * Fix tests do no use a deprecated API * Some other code style clean up in the affected classes **Cherry-pick to 5.2.x**

view details

push time in 11 days

issue closedspring-projects/spring-integration

String key should be Object, cause removeSessionFactory and getSessionFactory works with Object

https://github.com/spring-projects/spring-integration/blob/509e8237e8aa374990f07d288da083eb2229bdf5/spring-integration-file/src/main/java/org/springframework/integration/file/remote/session/DefaultSessionFactoryLocator.java#L57

closed time in 11 days

kezhevatov

push eventspring-cloud/spring-cloud-stream-binder-aws-kinesis

Pratyush Kumar

commit sha 8366416c2eab8867aad13a82d70172752c97055d

Add missed prefix into overview.adoc (Obvious fix)

view details

push time in 11 days

pull request commentspring-projects/spring-integration

GH-3155: Add support for Java DSL extensions

All docs fixed and rebased to master.

Thanks, Gary!

artembilan

comment created time in 12 days

push eventartembilan/spring-integration

Artem Bilan

commit sha 509e8237e8aa374990f07d288da083eb2229bdf5

Upgrade to Spring Security 5.3RC1; RSocket 1.0RC6

view details

Gary Russell

commit sha fa97ce0e6691b2ba2b382f62880f8c2b5c62a267

AMQP: Multiple Sends within an OB Channel Adapter In preparation for: https://github.com/spring-cloud/spring-cloud-stream-binder-rabbit/issues/209 When `multiSend` is true and multiple messages are sent as the payload of a message, each message is sent within the `invoke()` method of the `RabbitTemplate`. * Fix javadoc typo * Fix DSL Spec hierarchy * Protected CTOR/fields in new and modified specs * Protected CTORs, fields for remaining AMQP Specs

view details

Artem Bilan

commit sha 8ceb433d8ba2dbdbd2cc35c3c3a36cf884d34deb

GH-3155: Add support for Java DSL extensions Fixes https://github.com/spring-projects/spring-integration/issues/3155 Provide an `IntegrationFlowExtension` for possible custom EI-operators in the target project use-cases.

view details

Artem Bilan

commit sha 53a45650eb32f6ee5124c51d7c67664babf633de

* Move `IntegrationFlowExtension` tests ot its own test class * Make all the `IntegrationComponentSpec` ctors as `protected` for possible custom extensions * Make some `BaseIntegrationFlowDefinition` methods and properties as `protected` to get them access from the `IntegrationFlowExtension` implementations * Document the feature

view details

Artem Bilan

commit sha 41e01869584c715f47a0a6ed5f61a0f9cee6a44b

* Fix language and typos in docs

view details

push time in 12 days

Pull request review commentspring-projects/spring-integration

spring-projectsGH-3169: Fix DefaultSessionFactoryLocator addSessionFactory key's type from String to Objec

 public DefaultSessionFactoryLocator(Map<Object, SessionFactory<F>> factories, Se 	 * Add a session factory. 	 * @param key the lookup key. 	 * @param factory the factory.+	 * @deprecated since 5.3 in favor of {@link #addSessionFactory} 	 */+	@Deprecated 	public void addSessionFactory(String key, SessionFactory<F> factory) { 		this.factories.put(key, factory);

I have an opinion that deprecated API should call a new one for better coverage. This way when we need to make a change in the target logic, a deprecated API won't be affected because it is meant to be for removal eventually anyway. 😄

kezhevatov

comment created time in 12 days

Pull request review commentspring-projects/spring-integration

spring-projectsGH-3169: Fix DefaultSessionFactoryLocator addSessionFactory key's type from String to Objec

 public DefaultSessionFactoryLocator(Map<Object, SessionFactory<F>> factories, Se 	 * @param key the lookup key. 	 * @param factory the factory. 	 */-	public void addSessionFactory(String key, SessionFactory<F> factory) {+	public void addSessionFactory(Object key, SessionFactory<F> factory) {

How about this my concern: https://github.com/spring-projects/spring-integration/issues/3169#issuecomment-583058147 ?

Whenever we are going to back-port it we should keep backward compatibility, so an upgrade for the target project will be smooth. Even if we don't back-port it into a previous version, we still need to keep binary compatibility for current 5.3 version: Spring Cloud is going to support both Spring Boot 2.2 and 2.3 generations.

Therefore my concern about deprecating the current method and introduce a new one like you have done.

Thanks

kezhevatov

comment created time in 12 days

Pull request review commentspring-cloud/spring-cloud-stream

Add missing properties in DefaultPollerProperties

 public void setMaxMessagesPerPoll(long maxMessagesPerPoll) { 		this.maxMessagesPerPoll = maxMessagesPerPoll; 	} +	public String getCron() {+		return cron;

Don't we need to have a this. prefix whenever we access to class properties? I'm not sure what is your Checkstyle config, but it is not allowed without prefix in my projects.

Thanks

sobychacko

comment created time in 12 days

push eventspring-projects/spring-integration

Gary Russell

commit sha fa97ce0e6691b2ba2b382f62880f8c2b5c62a267

AMQP: Multiple Sends within an OB Channel Adapter In preparation for: https://github.com/spring-cloud/spring-cloud-stream-binder-rabbit/issues/209 When `multiSend` is true and multiple messages are sent as the payload of a message, each message is sent within the `invoke()` method of the `RabbitTemplate`. * Fix javadoc typo * Fix DSL Spec hierarchy * Protected CTOR/fields in new and modified specs * Protected CTORs, fields for remaining AMQP Specs

view details

push time in 12 days

PR merged spring-projects/spring-integration

AMQP: Multiple Sends within an OB Channel Adapter

In preparation for: https://github.com/spring-cloud/spring-cloud-stream-binder-rabbit/issues/209

When multiSend is true and multiple messages are sent as the payload of a message, each message is sent within the invoke() method of the RabbitTemplate.

+274 -60

0 comment

27 changed files

garyrussell

pr closed time in 12 days

Pull request review commentspring-projects/spring-integration

AMQP: Multiple Sends within an OB Channel Adapter

 public S errorMessageStrategy(ErrorMessageStrategy errorMessageStrategy) { 		return _this(); 	} +	/**+	 * Set a timeout after which a nack will be synthesized if no publisher confirm has+	 * been received within that time. Missing confirms will be checked every 50% of this+	 * value so the synthesized nack will be sent between 1x and 1.5x this timeout.+	 * @param timeout the approximate timeout.+	 * @return the spec.+	 * @since 5.3+	 */+	public S confirmTimeout(long timeout) {

Right, this is one of those I'd like to cover with DSL extensions and all those protected ctors 😄

garyrussell

comment created time in 12 days

push eventartembilan/spring-integration

Artem Bilan

commit sha e1053e8a287e1d35c3ea2cd31e42e9efe82e605c

* Move `IntegrationFlowExtension` tests ot its own test class * Make all the `IntegrationComponentSpec` ctors as `protected` for possible custom extensions * Make some `BaseIntegrationFlowDefinition` methods and properties as `protected` to get them access from the `IntegrationFlowExtension` implementations * Document the feature

view details

push time in 12 days

Pull request review commentspring-projects/spring-integration

AMQP: Multiple Sends within an OB Channel Adapter

+/*+ * Copyright 2020 the original author or authors.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ *      https://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++package org.springframework.integration.amqp.dsl;++import org.springframework.amqp.core.AmqpTemplate;+import org.springframework.messaging.Message;++/**+ * Spec for an outbound AMQP channel adapter+ *+ * @author Gary Russell+ * @since 5.3+ *+ */+public class AmqpOutboundChannelAdapterSpec extends AmqpOutboundEndpointSpec<AmqpOutboundChannelAdapterSpec> {++	AmqpOutboundChannelAdapterSpec(AmqpTemplate amqpTemplate) {

Gary, can you make all the ctors and final props in these AMQP specs as protected for possible extension? So, I won't include them into my extensions PR #3167 to avoid conflicts between our two fixes.

Thanks

garyrussell

comment created time in 12 days

issue commentspring-projects/spring-integration

String key should be Object, cause removeSessionFactory and getSessionFactory works with Object

I think for binary backward compatibility we need to deprecate an existing method and introduce a new one. The old one will be removed in the next version.

kezhevatov

comment created time in 12 days

issue commentspring-projects/spring-integration

Another "FtpSession - failed to disconnect FTPClient"

Thanks. That might be useful to observe similar logs during processing to determine a difference.

jonforums

comment created time in 12 days

issue commentspring-projects/spring-amqp

Javadoc for AbstractMessageListenerContainer::setErrorHandler does not reflect current implementation

It has to be included into a commit message. This is yours: https://github.com/spring-projects/spring-amqp/commit/5e9ec034f4dd744140a165772352d038d88ff241

But this is a rule: https://github.blog/2013-01-22-closing-issues-via-commit-messages/

andrebrait

comment created time in 12 days

issue commentspring-projects/spring-integration

Another "FtpSession - failed to disconnect FTPClient"

"new" problem on 5.2.x.

Yeah... That's really weird. Doesn't look like we have done some changes about caching in between.

@jonforums , any chances to to have some investigation on your side from the version 5.1.9?

Thanks

jonforums

comment created time in 12 days

more