Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Allow customization of Spring Integration objects used in Spring Cloud Stream #1432

Closed
elefeint opened this issue Feb 4, 2019 · 2 comments · Fixed by GoogleCloudPlatform/spring-cloud-gcp#97
Assignees

Comments

@elefeint
Copy link
Contributor

elefeint commented Feb 4, 2019

We don't seem to give Spring Cloud Stream client apps much ability to configure PubSubInboundChannelAdapter or PubSubMessageSource, since PubSubMessageChannelBinder directly instantiates both in its own code.

Both PubSubInboundChannelAdapter and PubSubMessageSource would benefit from ability to customize headerMapper and payloadType.

PubSubMessageSource also needs to allow customization of maxFetchSize -- in Spring Cloud Stream integration, it would give better performance to pull a batch over the network, and then stream it internally within the app.

The simplest way to implement the properties is by adding them to PubSubConsumerProperties.

@elefeint elefeint added the pubsub GCP PubSub label Feb 4, 2019
@artembilan
Copy link
Contributor

Note: the payloadType for Spring Cloud Stream must always be byte[]. The Spring Cloud Stream is responsible for proper conversion from byte[].

The headerMapper cannot be configured via properties since it has to be a bean.
We could provide some default one and allow end-user to override it with his/her own preferences. But again: do we really need to do that, unless just map everything we receive from Pub/Sub.
We talk about Spring Cloud Stream which has its own strong opinion.

We definitely can provide a hook to configure a maxFetchSize though.

Need also to dig for more properties if that...

@elefeint
Copy link
Contributor Author

elefeint commented Feb 4, 2019

Ah, so only maxFetchSize is reasonable. That should be easy then!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging a pull request may close this issue.

4 participants