Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DATAGO-89778: Bump org.springframework.cloud:spring-cloud-dependencies from 2023.0.3 to 2024.0.0 and spring.boot.version from 3.3.5 to 3.4.1 #344

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<repoName>SolaceProducts</repoName>

<!-- This is the version of Spring Cloud we have targeted for this build -->
<spring.cloud.version>2023.0.3</spring.cloud.version>
<spring.cloud.version>2024.0.0</spring.cloud.version>

<!-- This is the version of Solace Spring Boot we have targeted for this build -->
<!-- This also dictates the expected version of Spring Boot -->
Expand All @@ -30,7 +30,7 @@

<!-- Override spring-boot version from solace-spring-boot to latest patch version -->
<!-- Remove this if the next version of solace-spring-boot works fine -->
<spring.boot.version>3.3.5</spring.boot.version>
<spring.boot.version>3.4.1</spring.boot.version>

<solace.spring.cloud.stream-starter.version>5.6.1-SNAPSHOT</solace.spring.cloud.stream-starter.version>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import io.micrometer.core.instrument.MeterRegistry;
import io.micrometer.core.instrument.binder.BaseUnits;
import io.micrometer.core.instrument.binder.MeterBinder;
import org.jetbrains.annotations.NotNull;
import org.springframework.lang.NonNull;

public class SolaceMessageMeterBinder implements MeterBinder {
MeterRegistry registry;
Expand All @@ -17,21 +17,21 @@ public class SolaceMessageMeterBinder implements MeterBinder {
public static final String TAG_NAME = "name";

@Override
public void bindTo(@NotNull MeterRegistry registry) {
public void bindTo(@NonNull MeterRegistry registry) {
this.registry = registry;
}

public void recordMessage(@NotNull String bindingName, @NotNull XMLMessage message) {
public void recordMessage(@NonNull String bindingName, @NonNull XMLMessage message) {
long payloadSize = message.getAttachmentContentLength() + message.getContentLength();
registerSizeMeter(METER_NAME_TOTAL_SIZE, METER_DESCRIPTION_TOTAL_SIZE, bindingName)
.record(payloadSize + message.getBinaryMetadataContentLength(0));
registerSizeMeter(METER_NAME_PAYLOAD_SIZE, METER_DESCRIPTION_PAYLOAD_SIZE, bindingName)
.record(payloadSize);
}

private DistributionSummary registerSizeMeter(@NotNull String meterName,
@NotNull String description,
@NotNull String bindingName) {
private DistributionSummary registerSizeMeter(@NonNull String meterName,
@NonNull String description,
@NonNull String bindingName) {
return DistributionSummary.builder(meterName)
.description(description)
.tag(TAG_NAME, bindingName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1079,36 +1079,39 @@ public <T> void testConsumerReconnect(

Thread.sleep(TimeUnit.SECONDS.toMillis(5));

logger.info(String.format("Disabling egress to queue %s", queue0));
logger.info("Disabling egress to queue {}", queue0);
sempV2Api.config().updateMsgVpnQueue(vpnName, queue0, new ConfigMsgVpnQueue().egressEnabled(false), null, null);
Thread.sleep(TimeUnit.SECONDS.toMillis(5));

logger.info(String.format("Enabling egress to queue %s", queue0));
logger.info("Enabling egress to queue {}", queue0);
sempV2Api.config().updateMsgVpnQueue(vpnName, queue0, new ConfigMsgVpnQueue().egressEnabled(true), null, null);
Thread.sleep(TimeUnit.SECONDS.toMillis(5));

logger.info("Stopping producer");
producerStop.set(true);
int numMsgsSent = producerFuture.get(5, TimeUnit.SECONDS);

softly.assertThat(queue0).satisfies(q -> retryAssert(1, TimeUnit.MINUTES, () ->
logger.info("Waiting for consumer to finish processing messages");
softly.assertThat(queue0).satisfies(q -> retryAssert(5, TimeUnit.MINUTES, () ->
assertThat(sempV2Api.monitor()
.getMsgVpnQueueMsgs(vpnName, q, Integer.MAX_VALUE, null, null, null)
.getData()
.size())
.as("Expected queue %s to be empty after rebind", q)
.isEqualTo(0)));

MonitorMsgVpnQueue queueState = sempV2Api.monitor()
.getMsgVpnQueue(vpnName, queue0, null)
.getData();
softly.assertThat(queue0).satisfies(q -> retryAssert(1, TimeUnit.MINUTES, () -> {
MonitorMsgVpnQueue queueState = sempV2Api.monitor()
.getMsgVpnQueue(vpnName, q, null)
.getData();

softly.assertThat(queueState.getDisabledBindFailureCount()).isGreaterThan(0);
softly.assertThat(uniquePayloadsReceived.size()).isEqualTo(numMsgsSent);
softly.assertThat(numMsgsConsumed.get()).isGreaterThanOrEqualTo(numMsgsSent);
logger.info("num-sent: {}, num-consumed: {}, num-redelivered: {}", numMsgsSent, numMsgsConsumed.get(),
queueState.getRedeliveredMsgCount());
softly.assertThat(queueState.getDisabledBindFailureCount()).isGreaterThan(0);
softly.assertThat(uniquePayloadsReceived.size()).isEqualTo(numMsgsSent);
softly.assertThat(numMsgsConsumed.get()).isGreaterThanOrEqualTo(numMsgsSent);
}));

logger.info("num-sent: {}, num-consumed: {}, num-redelivered: {}", numMsgsSent, numMsgsConsumed.get(),
queueState.getRedeliveredMsgCount());
producerBinding.unbind();
consumerBinding.unbind();
}
Expand Down
Loading