Skip to content

Commit

Permalink
Code style
Browse files Browse the repository at this point in the history
  • Loading branch information
eolivelli committed May 8, 2024
1 parent 1d598e0 commit 655f7c9
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,17 @@ private boolean isHandleOnlySelectors(FilterContext context) {
}
boolean handleOnlySelectors;
switch (mode.toString()) {
case "full":
handleOnlySelectors = false;
break;
case "selectors-only":
handleOnlySelectors = true;
break;
default:
throw new IllegalArgumentException("Invalid jmsProcessingMode: " + mode + " only 'full' or 'selectors-only' are supported");
case "full":
handleOnlySelectors = false;
break;
case "selectors-only":
handleOnlySelectors = true;
break;
default:
throw new IllegalArgumentException(
"Invalid jmsProcessingMode: "
+ mode
+ " only 'full' or 'selectors-only' are supported");
}
this.handleOnlySelectors = handleOnlySelectors;
if (handleOnlySelectors) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,7 @@ public ConsumerBase<?> createConsumer(
// the plugin will apply filtering only on these subscriptions/consumers,
// in order to not impact on other subscriptions
consumerMetadata.put("jms.filtering", "true");
subscriptionProperties.put("jms.destination.type", destination.isQueue() ? "queue" : "topic");
subscriptionProperties.put("jms.destination.type", destination.isQueue() ? "queue" : "topic");
if (noLocal) {
consumerMetadata.put(
"jms.filter.JMSConnectionID", session.getConnection().getConnectionId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ public abstract class SelectorsTestsBase {
static PulsarContainerExtension pulsarContainer =
new PulsarContainerExtension()
.withEnv("PULSAR_PREFIX_transactionCoordinatorEnabled", "false")
.withEnv("PULSAR_PREFIX_jmsProcessingMode","full")
.withEnv("PULSAR_PREFIX_jmsProcessJMSExpiration","true");
.withEnv("PULSAR_PREFIX_jmsProcessingMode", "full")
.withEnv("PULSAR_PREFIX_jmsProcessJMSExpiration", "true");

private final boolean useServerSideFiltering;
private final boolean enableBatching;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@
@Slf4j
public class TimeToLiveTest {
@RegisterExtension
static PulsarContainerExtension pulsarContainer = new PulsarContainerExtension()
.withEnv("PULSAR_PREFIX_jmsProcessingMode","full")
.withEnv("PULSAR_PREFIX_jmsProcessJMSExpiration","true");
static PulsarContainerExtension pulsarContainer =
new PulsarContainerExtension()
.withEnv("PULSAR_PREFIX_jmsProcessingMode", "full")
.withEnv("PULSAR_PREFIX_jmsProcessJMSExpiration", "true");

private static Stream<Arguments> combinations() {
return Stream.of(
Expand Down

0 comments on commit 655f7c9

Please sign in to comment.