Add Spring Pulsar container property customizers
This commit adds the ability for users to register property customizers for the auto-configured Spring Pulsar listener containers. See #36347pull/37559/head
parent
845c4dd057
commit
3a2d562cef
@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2012-2023 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.boot.autoconfigure.pulsar;
|
||||||
|
|
||||||
|
import org.springframework.pulsar.listener.PulsarContainerProperties;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The interface to customize a {@link PulsarContainerProperties}.
|
||||||
|
*
|
||||||
|
* @author Chris Bono
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
@FunctionalInterface
|
||||||
|
public interface PulsarContainerPropertiesCustomizer {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Customizes a {@link PulsarContainerProperties}.
|
||||||
|
* @param containerProperties the container properties to customize
|
||||||
|
*/
|
||||||
|
void customize(PulsarContainerProperties containerProperties);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2023-2023 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.boot.autoconfigure.pulsar;
|
||||||
|
|
||||||
|
import org.springframework.pulsar.reader.PulsarReaderContainerProperties;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The interface to customize a {@link PulsarReaderContainerProperties}.
|
||||||
|
*
|
||||||
|
* @author Chris Bono
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
@FunctionalInterface
|
||||||
|
public interface PulsarReaderContainerPropertiesCustomizer {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Customizes a {@link PulsarReaderContainerProperties}.
|
||||||
|
* @param containerProperties the container properties to customize
|
||||||
|
*/
|
||||||
|
void customize(PulsarReaderContainerProperties containerProperties);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2023-2023 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.boot.autoconfigure.pulsar;
|
||||||
|
|
||||||
|
import org.springframework.pulsar.reactive.listener.ReactivePulsarContainerProperties;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The interface to customize a {@link ReactivePulsarContainerProperties}.
|
||||||
|
*
|
||||||
|
* @param <T> the message payload type
|
||||||
|
* @author Chris Bono
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
@FunctionalInterface
|
||||||
|
public interface ReactivePulsarContainerPropertiesCustomizer<T> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Customizes a {@link ReactivePulsarContainerProperties}.
|
||||||
|
* @param containerProperties the container properties to customize
|
||||||
|
*/
|
||||||
|
void customize(ReactivePulsarContainerProperties<T> containerProperties);
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue