From 3ee0b5f5abd7481704a73f16f2a2a1c2de219ece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Sun, 30 May 2021 11:08:46 +0200 Subject: [PATCH 001/435] Add WIP version of qpid-protonj2 cli; Java 11 support (#244) * Passes JAMQAuthentication111Tests#test_default_username_right_password_right * Passes JAMQAuthentication111Tests#test_direct_transient_empty_message_with_string_property * Passes JAMQMsgPatterns111Tests#test_direct_transient_text_message * Passes JAMQMsgPatterns111Tests#test_publish_subscribe_string * make qpid clients be Java 11 only --- .github/workflows/maven.yml | 9 +- .travis.yml | 16 +- cli-protonj2/pom.xml | 157 ++++++++ .../src/main/java/com/redhat/mqe/Main.java | 375 ++++++++++++++++++ .../src/main/resources/log4j.properties | 42 ++ .../test/java/com/redhat/mqe/MainTest.java | 167 ++++++++ .../src/test/java/resources/log4j.properties | 42 ++ interop-tests/pom.xml | 5 + pom.xml | 11 +- tests.sh | 39 ++ 10 files changed, 843 insertions(+), 20 deletions(-) create mode 100644 cli-protonj2/pom.xml create mode 100644 cli-protonj2/src/main/java/com/redhat/mqe/Main.java create mode 100644 cli-protonj2/src/main/resources/log4j.properties create mode 100644 cli-protonj2/src/test/java/com/redhat/mqe/MainTest.java create mode 100644 cli-protonj2/src/test/java/resources/log4j.properties create mode 100644 tests.sh diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index c8098889..0b4f20e9 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -17,14 +17,15 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 + - name: Set up JDK 11 + uses: actions/setup-java@v2 with: - java-version: 1.8 + distribution: 'adopt-openj9' + java-version: '11' - name: Build with Maven run: mvn -B package --file pom.xml - + - name: Install the qpid-jms subtree (needed for the next step) run: mvn clean install -DskipTests -pl :cli-qpid-jms -am diff --git a/.travis.yml b/.travis.yml index 08bafddf..2186c97e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,21 +23,7 @@ script: - docker run --rm -v`pwd`/scripts:/mnt -p 1883:1883 -p 5672:5672 -p 61616:61616 -p 5673:5673 -p 61617:61617 --entrypoint bash quay.io/jdanek/docker-alpine-openjdk-artemis-snapshot:latest /mnt/entrypoint.sh amq7-server & - sleep 10 - mvn clean package -Ptests,coverage - - - java -jar cli-activemq/target/cli-activemq-1.2.2-SNAPSHOT-*.jar sender --address cli-activemq --log-msgs json --count 1 - - java -jar cli-activemq/target/cli-activemq-1.2.2-SNAPSHOT-*.jar receiver --address cli-activemq --log-msgs json --count 1 - - java -jar cli-activemq/target/cli-activemq-1.2.2-SNAPSHOT-*.jar sender --conn-username test --conn-ssl-verify-host false --conn-password test --msg-content msg no. %d --broker ssl://127.0.0.1:61617 --conn-auth-mechanisms PLAIN --timeout 30 --log-msgs json --log-lib trace --address message-basiccli_jms --count 10 --conn-ssl-trust-all true - - - java -jar cli-artemis-jms/target/cli-artemis-jms-1.2.2-SNAPSHOT-*.jar sender --address cli-artemis-jms --log-msgs json --count 1 - - java -jar cli-artemis-jms/target/cli-artemis-jms-1.2.2-SNAPSHOT-*.jar receiver --address cli-artemis-jms --log-msgs json --count 1 - - java -jar cli-artemis-jms/target/cli-artemis-jms-1.2.2-SNAPSHOT-*.jar sender --conn-username test --conn-ssl-verify-host false --conn-password test --msg-content msg no. %d --broker tcp://127.0.0.1:61617 --conn-auth-mechanisms PLAIN --timeout 30 --log-msgs json --log-lib trace --address message-basiccli_jms --count 10 --conn-ssl-trust-all true - - - cli_qpid_jms_jar=$(find cli-qpid-jms/target -name 'cli-qpid-jms-1.2.2-SNAPSHOT-*.jar' -not -name '*-tests.jar') - - java -jar ${cli_qpid_jms_jar} sender --address cli-qpid-jms --log-msgs json --count 1 - - java -jar ${cli_qpid_jms_jar} receiver --address cli-qpid-jms --log-msgs json --count 1 - - java -jar ${cli_qpid_jms_jar} sender --conn-username test --conn-ssl-verify-host false --conn-password test --msg-content msg no. %d --broker amqps://127.0.0.1:5673 --conn-auth-mechanisms PLAIN --timeout 30 --log-msgs json --log-lib trace --address message-basiccli_jms --count 10 --conn-ssl-trust-all true - - - java -jar cli-paho-java/target/cli-paho-java-1.2.2-SNAPSHOT-*.jar sender --address cli-paho-java --log-msgs json --count 1 + - bash ./tests.sh after_success: - bash <(curl -s https://codecov.io/bash) diff --git a/cli-protonj2/pom.xml b/cli-protonj2/pom.xml new file mode 100644 index 00000000..ffb9b447 --- /dev/null +++ b/cli-protonj2/pom.xml @@ -0,0 +1,157 @@ + + + + + 4.0.0 + + + com.redhat.cli-java + parent + 1.2.2-SNAPSHOT + ../parent/pom.xml + + + cli-protonj2 + jar + + + jms + 1.0.0-M1 + com.redhat.mqe.Main + ${protonj2.version} + 2.0.39.Final + linux-x86_64-fedora + 1.6.0 + + + + + staging + https://repository.apache.org/content/repositories/orgapacheqpid-1218 + + + + + + + + + + + + + + + + + + org.junit-pioneer + junit-pioneer + test + + + org.awaitility + awaitility + test + + + + com.redhat.cli-java + jmslib + + + + org.apache.qpid + protonj2-client + ${protonj2.version} + + + + info.picocli + picocli + 4.6.1 + + + + com.redhat.cli-java + tests + test-jar + test + + + com.google.truth + truth + test + + + + org.apache.activemq + artemis-amqp-protocol + test + + + com.redhat.cli-java + broker + 1.2.2-SNAPSHOT + test-jar + test + + + + + + + org.apache.maven.plugins + maven-shade-plugin + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cli-protonj2/src/main/java/com/redhat/mqe/Main.java b/cli-protonj2/src/main/java/com/redhat/mqe/Main.java new file mode 100644 index 00000000..c421fa34 --- /dev/null +++ b/cli-protonj2/src/main/java/com/redhat/mqe/Main.java @@ -0,0 +1,375 @@ +package com.redhat.mqe; + +import com.redhat.mqe.lib.ClientOptions; +import com.redhat.mqe.lib.ConnectionManager; +import org.apache.qpid.protonj2.client.ReceiverOptions; +import org.apache.qpid.protonj2.client.SenderOptions; +import org.apache.qpid.protonj2.client.exceptions.ClientException; +import picocli.CommandLine; +import picocli.CommandLine.Command; +import picocli.CommandLine.Option; +import picocli.CommandLine.Parameters; + +import org.apache.qpid.protonj2.client.Client; +import org.apache.qpid.protonj2.client.Connection; +import org.apache.qpid.protonj2.client.ConnectionOptions; +import org.apache.qpid.protonj2.client.Delivery; +import org.apache.qpid.protonj2.client.Message; +import org.apache.qpid.protonj2.client.Receiver; +import org.apache.qpid.protonj2.client.Sender; + +import java.io.File; +import java.math.BigInteger; +import java.net.URI; +import java.nio.file.Files; +import java.security.MessageDigest; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.Callable; +import java.util.concurrent.TimeUnit; + +import static com.redhat.mqe.lib.ClientOptionManager.QUEUE_PREFIX; +import static com.redhat.mqe.lib.ClientOptionManager.TOPIC_PREFIX; + +@Command( + name = "cli-protonj2", + mixinStandardHelpOptions = true, + version = "1.0.0", + description = "Sends and receives messages using Qpid Proton-J2 AMQP library.", + subcommands = { + CliProtonJ2Connector.class, + CliProtonJ2Sender.class, + CliProtonJ2Receiver.class + } +) +class Main implements Callable { + @Override + public Integer call() throws Exception { // your business logic goes here... + return 0; + } + + // this example implements Callable, so parsing, error handling and handling user + // requests for usage help or version help can be done with one line of code. + public static void main(String... args) { + int exitCode = new CommandLine(new Main()).execute(args); + System.exit(exitCode); + } +} + +class CliProtonJ2SenderReceiver { + void logMessage(String address, Message message) throws ClientException { + StringBuilder sb = new StringBuilder(); + + sb.append("{"); + + addKeyValue(sb, "address", address); + addKeyValue(sb, "group-id", message.groupId()); + addKeyValue(sb, "subject", message.subject()); + addKeyValue(sb, "user-id", message.userId()); + addKeyValue(sb, "correlation-id", message.correlationId()); + addKeyValue(sb, "content-encoding", message.contentEncoding()); + addKeyValue(sb, "priority", message.priority()); + addKeyValue(sb, "type", "string"); // ??? + addKeyValue(sb, "ttl", message.timeToLive()); + addKeyValue(sb, "absolute-expiry-time", message.absoluteExpiryTime()); + addKeyValue(sb, "content", message.body()); + addKeyValue(sb, "redelivered", message.deliveryCount() > 1); + addKeyValue(sb, "reply-to-group-id", message.replyToGroupId()); + addKeyValue(sb, "durable", message.durable()); + addKeyValue(sb, "group-sequence", message.groupSequence()); + addKeyValue(sb, "creation-time", message.creationTime()); + addKeyValue(sb, "content-type", message.contentType()); + addKeyValue(sb, "id", message.messageId()); + addKeyValue(sb, "reply-to", message.replyTo()); + + // getPropertyNames? from JMS missing? + StringBuilder sbb = new StringBuilder(); + sbb.append('{'); +// AtomicBoolean first = new AtomicBoolean(true); + message.forEachProperty((s, o) -> { +// if (!first.get()) { +// sbb.append(", "); +// first.set(false); +// } + addKeyValue(sbb, s, o); + }); + if (message.hasProperties()) { + sbb.delete(sbb.length() - 2, sbb.length()); // remove last ", " + } + sbb.append('}'); + addKeyValue(sb, "properties", sbb); // ??? + + sb.delete(sb.length() - 2, sb.length()); // remove last ", " + + sb.append("}"); + + System.out.println(sb); + } + + void addKeyValue(StringBuilder sb, String key, Object value) { + sb.append("'"); + sb.append(key); + sb.append("': "); + sb.append(formatPython(value)); + sb.append(", "); + } + + String formatPython(Object parameter) { + if (parameter == null) { + return "None"; + } + if (parameter instanceof String) { + return "'" + parameter + "'"; + } + if (parameter instanceof Boolean) { + return ((boolean)parameter) ? "True" : "False"; + } + if (parameter instanceof StringBuilder) { + return parameter.toString(); + } + return "'" + parameter + "'"; + } +} + +@Command( + name = "connector", + mixinStandardHelpOptions = true, + version = "1.0.0", + description = "Opens AMQP connections" +) +class CliProtonJ2Connector implements Callable { + + @Parameters(index = "0", description = "The file whose checksum to calculate.") + private File file; + + @Option(names = {"-a", "--algorithm"}, description = "MD5, SHA-1, SHA-256, ...") + private String algorithm = "MD5"; + + @Override + public Integer call() throws Exception { // your business logic goes here... + byte[] fileContents = Files.readAllBytes(file.toPath()); + byte[] digest = MessageDigest.getInstance(algorithm).digest(fileContents); + System.out.printf("%0" + (digest.length * 2) + "x%n", new BigInteger(1, digest)); + + System.out.println("Hello World"); + + final String serverHost = System.getProperty("HOST", "localhost"); + final int serverPort = Integer.getInteger("PORT", 5672); + final String address = System.getProperty("ADDRESS", "hello-world-example"); + + final Client client = Client.create(); + + final ConnectionOptions options = new ConnectionOptions(); + options.user(System.getProperty("USER")); + options.password(System.getProperty("PASSWORD")); + + try (Connection connection = client.connect(serverHost, serverPort, options); + Receiver receiver = connection.openReceiver(address); + Sender sender = connection.openSender(address)) { + + sender.send(Message.create("Hello World")); + + Delivery delivery = receiver.receive(); + Message received = delivery.message(); + System.out.println("Received message with body: " + received.body()); + } + + return 0; + } +} + +enum AuthMechanism { + PLAIN, +} + +@Command( + name = "sender", + mixinStandardHelpOptions = true, + version = "1.0.0", + description = "Opens AMQP connections" +) +class CliProtonJ2Sender extends CliProtonJ2SenderReceiver implements Callable { + + @Option(names = {"--log-msgs"}, description = "MD5, SHA-1, SHA-256, ...") + private String logMsgs = "MD5"; + + @Option(names = {"--broker"}, description = "MD5, SHA-1, SHA-256, ...") + private String broker = "MD5"; + + @Option(names = {"--conn-username"}, description = "MD5, SHA-1, SHA-256, ...") + private String connUsername = "MD5"; + + @Option(names = {"--conn-password"}, description = "MD5, SHA-1, SHA-256, ...") + private String connPassword = "MD5"; + + @Option(names = {"--address"}, description = "MD5, SHA-1, SHA-256, ...") + private String address = "MD5"; + + @Option(names = {"--count"}, description = "MD5, SHA-1, SHA-256, ...") + private int count = 1; + + @Option(names = {"--timeout"}, description = "MD5, SHA-1, SHA-256, ...") + private int timeout; + + @Option(names = {"--conn-auth-mechanisms"}, description = "MD5, SHA-1, SHA-256, ...") // todo, want to accept comma-separated lists; there is https://picocli.info/#_split_regex + private List connAuthMechanisms = new ArrayList<>(); + + @Option(names = {"--msg-property"}) // picocli Map options works for this, sounds like + private List msgProperties = new ArrayList<>(); + + @Option(names = {"--msg-content"}) + private String msgContent; + + @Option(names = {"--msg-correlation-id"}) + private String msgCorrelationId; + + @Override + public Integer call() throws Exception { // your business logic goes here... + + String prefix = ""; + if (!broker.startsWith("amqp://") || !broker.startsWith("amqps://")) { + prefix = "amqp://"; + } + final URI url = new URI(prefix + broker); + final String serverHost = url.getHost(); + int serverPort = url.getPort(); + serverPort = (serverPort == -1) ? 5672 : serverPort; + + String destinationCapability = "queue"; + if (address.startsWith(TOPIC_PREFIX)) { + address = address.substring((TOPIC_PREFIX.length())); + destinationCapability = "topic"; + } + if (address.startsWith(QUEUE_PREFIX)) { + address = address.substring((QUEUE_PREFIX.length())); + } + + final Client client = Client.create(); + + final ConnectionOptions options = new ConnectionOptions(); + options.user(connUsername); + options.password(connPassword); + for (AuthMechanism mech : connAuthMechanisms) { + options.saslOptions().addAllowedMechanism(mech.name()); + } + + /* + TODO API usablility, hard to ask for queue when dealing with broker that likes to autocreate topics + */ + SenderOptions senderOptions = new SenderOptions(); + // is it target or source? target. + senderOptions.targetOptions().capabilities(destinationCapability); + try (Connection connection = client.connect(serverHost, serverPort, options); + Sender sender = connection.openSender(address, senderOptions)) { + + for (int i = 0; i < count; i++) { + final Message message = Message.create(msgContent); + for (String property : msgProperties) { + String[] fields = property.split("=", 2); + if (fields.length != 2) { + throw new RuntimeException("Wrong format " + Arrays.toString(fields)); // TODO do this in args parsing + } + String key = fields[0]; + String value = fields[1]; // more types + message.property(key, value); + } + if (msgCorrelationId != null) { + message.correlationId(msgCorrelationId); + } + sender.send(message); // TODO what's timeout for in a sender? + logMessage(address, message); + } + } + + return 0; + } +} + +@Command( + name = "receiver", + mixinStandardHelpOptions = true, + version = "1.0.0", + description = "Opens AMQP connections" +) +class CliProtonJ2Receiver extends CliProtonJ2SenderReceiver implements Callable { + + @Option(names = {"--log-msgs"}, description = "MD5, SHA-1, SHA-256, ...") + private String logMsgs = "MD5"; + + @Option(names = {"--broker"}, description = "MD5, SHA-1, SHA-256, ...") + private String broker = "MD5"; + + @Option(names = {"--conn-username"}, description = "MD5, SHA-1, SHA-256, ...") + private String connUsername = "MD5"; + + @Option(names = {"--conn-password"}, description = "MD5, SHA-1, SHA-256, ...") + private String connPassword = "MD5"; + + @Option(names = {"--address"}, description = "MD5, SHA-1, SHA-256, ...") + private String address = "MD5"; + + @Option(names = {"--count"}, description = "MD5, SHA-1, SHA-256, ...") + private int count = 1; + + @Option(names = {"--timeout"}, description = "MD5, SHA-1, SHA-256, ...") + private int timeout; + + @Option(names = {"--conn-auth-mechanisms"}, description = "MD5, SHA-1, SHA-256, ...") // todo, want to accept comma-separated lists; there is https://picocli.info/#_split_regex + private List connAuthMechanisms = new ArrayList<>(); + + @Override + public Integer call() throws Exception { // your business logic goes here... + String prefix = ""; + if (!broker.startsWith("amqp://") || !broker.startsWith("amqps://")) { + prefix = "amqp://"; + } + final URI url = new URI(prefix + broker); + final String serverHost = url.getHost(); + int serverPort = url.getPort(); + serverPort = (serverPort == -1) ? 5672 : serverPort; + + String destinationCapability = "queue"; + if (address.startsWith(TOPIC_PREFIX)) { + address = address.substring((TOPIC_PREFIX.length())); + destinationCapability = "topic"; + } + if (address.startsWith(QUEUE_PREFIX)) { + address = address.substring((QUEUE_PREFIX.length())); + } + + final Client client = Client.create(); + + final ConnectionOptions options = new ConnectionOptions(); + options.user(connUsername); + options.password(connPassword); + for (AuthMechanism mech : connAuthMechanisms) { + options.saslOptions().addAllowedMechanism(mech.name()); + } + + /* + TODO API usablility, hard to ask for queue when dealing with broker that likes to autocreate topics + */ + ReceiverOptions receiverOptions = new ReceiverOptions(); + // is it target or source? target. + receiverOptions.sourceOptions().capabilities(destinationCapability); + try (Connection connection = client.connect(serverHost, serverPort, options); + Receiver receiver = connection.openReceiver(address, receiverOptions)) { + + for (int i = 0; i < count; i++) { + final Delivery delivery; + if (timeout == 0) { + delivery = receiver.receive(); // todo: can default it to -1 + } else { + delivery = receiver.receive(timeout, TimeUnit.SECONDS); + } + + int messageFormat = delivery.messageFormat(); + Message message = delivery.message(); + logMessage(address, message); + } + } + + return 0; + } +} diff --git a/cli-protonj2/src/main/resources/log4j.properties b/cli-protonj2/src/main/resources/log4j.properties new file mode 100644 index 00000000..37b7713d --- /dev/null +++ b/cli-protonj2/src/main/resources/log4j.properties @@ -0,0 +1,42 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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 +# +# http://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. +# + +# Set root logger level to DEBUG and its only appender to console +# This sets ALL the logs to given level. +log4j.rootLogger=ERROR, console + +# Uncomment this to get debug logs from qpid-jms +#log4j.logger.org.apache.qpid=DEBUG, console + +log4j.logger.com.redhat.mqe.jms=INFO, console +log4j.additivity.com.redhat.mqe.jms=false + +log4j.logger.io.netty=WARN, console +log4j.logger.netty=WARN, console + +# Log transport.traceBytes=true messages +log4j.logger.org.apache.qpid.jms.transports.netty.NettyTcpTransport=DEBUG, console + +# Appender "console" settings +log4j.appender.console=org.apache.log4j.ConsoleAppender +log4j.appender.console.target=System.err +log4j.appender.console.Threshold=all +log4j.appender.console.layout=org.apache.log4j.PatternLayout +#log4j.appender.console.layout.ConversionPattern=%t %d %p [%c{4}] %m%n +log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} %p %m%n diff --git a/cli-protonj2/src/test/java/com/redhat/mqe/MainTest.java b/cli-protonj2/src/test/java/com/redhat/mqe/MainTest.java new file mode 100644 index 00000000..4eba5bd2 --- /dev/null +++ b/cli-protonj2/src/test/java/com/redhat/mqe/MainTest.java @@ -0,0 +1,167 @@ +/* + * Copyright (c) 2021 Red Hat, Inc. + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 + * + * http://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 com.redhat.mqe; + +import com.google.common.truth.Truth; +import kotlin.jvm.functions.Function0; +import kotlin.jvm.internal.Intrinsics; +import kotlin.test.AssertionsKt; +import org.jetbrains.annotations.NotNull; +import org.junit.Assert; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Timeout; +import org.junit.jupiter.api.extension.ExtendWith; +import org.junit.jupiter.api.function.Executable; +import util.Broker; +import util.BrokerFixture; + +import java.security.Permission; +import java.util.concurrent.TimeUnit; + +class SystemExitingWithStatus extends RuntimeException { + public final int status; + + public SystemExitingWithStatus(int status) { + this.status = status; + } +} + +class NoExitSecurityManager extends SecurityManager { + private final SecurityManager parentManager; + + @Override + public void checkPermission(Permission perm) { + // allow all + } + + @Override + public void checkPermission(Permission perm, Object context) { + // allow all + } + + @Override + public void checkExit(int status) { + throw new SystemExitingWithStatus(status); + } + + NoExitSecurityManager(SecurityManager parentManager) { + this.parentManager = parentManager; + } + + public static void assertSystemExit(int status, @NotNull Executable executable) throws Throwable { + Intrinsics.checkNotNullParameter(executable, "executable"); + SecurityManager previousManager = System.getSecurityManager(); + + try { + NoExitSecurityManager manager = new NoExitSecurityManager(previousManager); + System.setSecurityManager(manager); + executable.execute(); + Assertions.fail("expected exception"); + } catch (SystemExitingWithStatus exception) { + Truth.assertThat(exception.status).isEqualTo(status); + } finally { + System.setSecurityManager(previousManager); + } + } + + public static void assertNoSystemExit(@NotNull Function0 executable) { + Intrinsics.checkNotNullParameter(executable, "executable"); + SecurityManager previousManager = System.getSecurityManager(); + + try { + NoExitSecurityManager manager = new NoExitSecurityManager(previousManager); + System.setSecurityManager((SecurityManager) manager); + executable.invoke(); + } catch (SystemExitingWithStatus var5) { + Assertions.fail("System.exit has been called"); + } finally { + System.setSecurityManager(previousManager); + } + } +} + +class MainTest { + @BeforeAll + static void configureLogging() { + // turn on extra verbose logging + //Broker.configureLogging(); + } + + void checkMainInvocation(String cmd) throws Throwable { + String[] args = cmd.split(" "); + NoExitSecurityManager.assertSystemExit(0, () -> { + Main.main(args); + }); + } + + @Test + @Timeout(value = 60, unit = TimeUnit.SECONDS) + @ExtendWith(BrokerFixture.class) + void testAckWithSessionClose(@BrokerFixture.TempBroker Broker broker) throws Throwable { + broker.configuration.setSecurityEnabled(false); + broker.configuration.setPersistenceEnabled(false); // this, or tmpdir, otherwise test runs interact + broker.startBroker(); + + // todo: have to handle amqp:// prefix + String brokerUrl = "localhost:" + broker.addAMQPAcceptor(); + + NoExitSecurityManager.assertSystemExit(0, () -> { + Main.main( + "sender", "--log-msgs=dict", "--broker=" + brokerUrl, "--conn-username=tckuser", "--conn-password=tckuser", "--address=test_default_username_right_password_right", "--count=1" + ); + }); + + NoExitSecurityManager.assertSystemExit(0, () -> { + Main.main( + "sender", "--timeout=2", "--log-msgs=dict", "--broker=" + brokerUrl, "--conn-auth-mechanisms=PLAIN", "--conn-username=admin", "--conn-password=admin", "--address=test_direct_transient_empty_message_with_string_property", "--count=10", "--msg-property=key1=value1" + ); + }); + + NoExitSecurityManager.assertSystemExit(0, () -> { + Main.main( + "receiver", "--timeout=2", "--log-msgs=dict", "--broker=" + brokerUrl, "--conn-auth-mechanisms=PLAIN", "--conn-username=admin", "--conn-password=admin", "--address=test_direct_transient_empty_message_with_string_property", "--count=10" + ); + }); + + NoExitSecurityManager.assertSystemExit(0, () -> { + Main.main( + "sender", "--log-msgs=dict", "--broker=" + brokerUrl, "--conn-auth-mechanisms=PLAIN", "--conn-username=admin", "--conn-password=admin", "--address=test_direct_transient_text_message", "--count=1", "--msg-content=Simple Text Message", "--msg-correlation-id=corr-id-JWXoIk" + ); + }); + + // test_direct_transient_text_message + checkMainInvocation("sender --log-msgs dict --broker " + brokerUrl + " --conn-auth-mechanisms PLAIN --conn-username admin --conn-password admin --address test_direct_transient_text_message --count 1 --msg-content SimpleTextMessage --msg-correlation-id corr-id-eqa9vp"); + checkMainInvocation("receiver --log-msgs dict --broker " + brokerUrl + " --conn-auth-mechanisms PLAIN --conn-username admin --conn-password admin --address test_direct_transient_text_message --count 1"); + + // test_publish_subscribe_string + Thread t = new Thread(() -> { + try { + checkMainInvocation("receiver --timeout 100 --log-msgs dict --broker " + brokerUrl + " --conn-auth-mechanisms PLAIN --conn-username admin --conn-password admin --address topic://test_publish_subscribe_string --count 3"); + } catch (Throwable throwable) { + throwable.printStackTrace(); + } + }); + Thread.sleep(100); // do I really want to do things like this? need better check I have a subscriber on broker + checkMainInvocation("sender --log-msgs dict --broker " + brokerUrl + " --conn-auth-mechanisms PLAIN --conn-username admin --conn-password admin --address topic://test_publish_subscribe_string --count 3 --msg-content ABC --msg-correlation-id some-corr-id"); + t.join(); + } +} diff --git a/cli-protonj2/src/test/java/resources/log4j.properties b/cli-protonj2/src/test/java/resources/log4j.properties new file mode 100644 index 00000000..37b7713d --- /dev/null +++ b/cli-protonj2/src/test/java/resources/log4j.properties @@ -0,0 +1,42 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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 +# +# http://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. +# + +# Set root logger level to DEBUG and its only appender to console +# This sets ALL the logs to given level. +log4j.rootLogger=ERROR, console + +# Uncomment this to get debug logs from qpid-jms +#log4j.logger.org.apache.qpid=DEBUG, console + +log4j.logger.com.redhat.mqe.jms=INFO, console +log4j.additivity.com.redhat.mqe.jms=false + +log4j.logger.io.netty=WARN, console +log4j.logger.netty=WARN, console + +# Log transport.traceBytes=true messages +log4j.logger.org.apache.qpid.jms.transports.netty.NettyTcpTransport=DEBUG, console + +# Appender "console" settings +log4j.appender.console=org.apache.log4j.ConsoleAppender +log4j.appender.console.target=System.err +log4j.appender.console.Threshold=all +log4j.appender.console.layout=org.apache.log4j.PatternLayout +#log4j.appender.console.layout.ConversionPattern=%t %d %p [%c{4}] %m%n +log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} %p %m%n diff --git a/interop-tests/pom.xml b/interop-tests/pom.xml index 7efda41c..f17d55b0 100644 --- a/interop-tests/pom.xml +++ b/interop-tests/pom.xml @@ -33,6 +33,11 @@ cli-qpid-jms 1.2.2-SNAPSHOT + + com.redhat.cli-java + cli-protonj2 + 1.2.2-SNAPSHOT + com.redhat.cli-java diff --git a/pom.xml b/pom.xml index f8d642ce..53a9daec 100644 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,6 @@ cli-activemq cli-artemis-jms cli-paho-java - cli-qpid-jms broker @@ -76,5 +75,15 @@ interop-tests + + java11plus + + [11,) + + + cli-protonj2 + cli-qpid-jms + + diff --git a/tests.sh b/tests.sh new file mode 100644 index 00000000..8f4d1d07 --- /dev/null +++ b/tests.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +set -Eeuo pipefail +set -x + +# +# Copyright (c) 2021 Red Hat, Inc. +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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 +# +# http://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. +# + +java -jar cli-activemq/target/cli-activemq-1.2.2-SNAPSHOT-*.jar sender --address cli-activemq --log-msgs json --count 1 +java -jar cli-activemq/target/cli-activemq-1.2.2-SNAPSHOT-*.jar receiver --address cli-activemq --log-msgs json --count 1 +java -jar cli-activemq/target/cli-activemq-1.2.2-SNAPSHOT-*.jar sender --conn-username test --conn-ssl-verify-host false --conn-password test --msg-content msg no. %d --broker ssl://127.0.0.1:61617 --conn-auth-mechanisms PLAIN --timeout 30 --log-msgs json --log-lib trace --address message-basiccli_jms --count 10 --conn-ssl-trust-all true + +java -jar cli-artemis-jms/target/cli-artemis-jms-1.2.2-SNAPSHOT-*.jar sender --address cli-artemis-jms --log-msgs json --count 1 +java -jar cli-artemis-jms/target/cli-artemis-jms-1.2.2-SNAPSHOT-*.jar receiver --address cli-artemis-jms --log-msgs json --count 1 +java -jar cli-artemis-jms/target/cli-artemis-jms-1.2.2-SNAPSHOT-*.jar sender --conn-username test --conn-ssl-verify-host false --conn-password test --msg-content msg no. %d --broker tcp://127.0.0.1:61617 --conn-auth-mechanisms PLAIN --timeout 30 --log-msgs json --log-lib trace --address message-basiccli_jms --count 10 --conn-ssl-trust-all true + +java -jar cli-paho-java/target/cli-paho-java-1.2.2-SNAPSHOT-*.jar sender --address cli-paho-java --log-msgs json --count 1 + +if [[ $TRAVIS_JDK_VERSION == "openjdk8" ]] || [[ $TRAVIS_JDK_VERSION == "oraclejdk8" ]]; then exit 0; fi + +cli_qpid_jms_jar=$(find cli-qpid-jms/target -name 'cli-qpid-jms-1.2.2-SNAPSHOT-*.jar' -not -name '*-tests.jar') +java -jar ${cli_qpid_jms_jar} sender --address cli-qpid-jms --log-msgs json --count 1 +java -jar ${cli_qpid_jms_jar} receiver --address cli-qpid-jms --log-msgs json --count 1 +java -jar ${cli_qpid_jms_jar} sender --conn-username test --conn-ssl-verify-host false --conn-password test --msg-content msg no. %d --broker amqps://127.0.0.1:5673 --conn-auth-mechanisms PLAIN --timeout 30 --log-msgs json --log-lib trace --address message-basiccli_jms --count 10 --conn-ssl-trust-all true From a4bb1ce30412552eaa70c5cbf67486a5193b737f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 30 May 2021 11:28:27 +0200 Subject: [PATCH 002/435] Bump qpid-jms-parent from 0.58.0 to 1.0.0 (#248) Bumps qpid-jms-parent from 0.58.0 to 1.0.0. Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cli-qpid-jms/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-qpid-jms/pom.xml b/cli-qpid-jms/pom.xml index 57a1d93b..029e268c 100644 --- a/cli-qpid-jms/pom.xml +++ b/cli-qpid-jms/pom.xml @@ -35,7 +35,7 @@ jms com.redhat.mqe.jms.Main - 0.58.0 + 1.0.0 ${qpid.jms.client.version} 2.0.39.Final linux-x86_64-fedora From 9359dc66485f19e5981e41963571b7e8e9750a9f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 May 2021 09:24:04 +0200 Subject: [PATCH 003/435] Bump junit-pioneer from 1.4.1 to 1.4.2 (#255) Bumps [junit-pioneer](https://github.com/junit-pioneer/junit-pioneer) from 1.4.1 to 1.4.2. - [Release notes](https://github.com/junit-pioneer/junit-pioneer/releases) - [Commits](https://github.com/junit-pioneer/junit-pioneer/compare/v1.4.1...v1.4.2) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index a8d11e4e..f319a22f 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -40,7 +40,7 @@ 1.5.10 5.7.2 - 1.4.1 + 1.4.2 1.1.3 3.10.0 4.1.0 From de956430cacc6194558a83b0d5381d0e64280a33 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Jun 2021 07:58:25 +0200 Subject: [PATCH 004/435] Bump checker-qual from 3.13.0 to 3.14.0 (#257) Bumps [checker-qual](https://github.com/typetools/checker-framework) from 3.13.0 to 3.14.0. - [Release notes](https://github.com/typetools/checker-framework/releases) - [Changelog](https://github.com/typetools/checker-framework/blob/master/docs/CHANGELOG.md) - [Commits](https://github.com/typetools/checker-framework/compare/checker-framework-3.13.0...checker-framework-3.14.0) --- updated-dependencies: - dependency-name: org.checkerframework:checker-qual dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index f319a22f..99d1b51d 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -57,7 +57,7 @@ 2.7 21.0.1 - 3.13.0 + 3.14.0 From ba26bef0fa01e9ba8c8bb0d1cd3103376605f2b3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Jun 2021 15:21:13 +0200 Subject: [PATCH 005/435] Bump protonj2-client from 1.0.0-M1 to 1.0.0-M2 (#256) Bumps protonj2-client from 1.0.0-M1 to 1.0.0-M2. Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cli-protonj2/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-protonj2/pom.xml b/cli-protonj2/pom.xml index ffb9b447..9bade6b0 100644 --- a/cli-protonj2/pom.xml +++ b/cli-protonj2/pom.xml @@ -34,7 +34,7 @@ jms - 1.0.0-M1 + 1.0.0-M2 com.redhat.mqe.Main ${protonj2.version} 2.0.39.Final From ec7e6578ed72328366056218305ba9b336f2ae15 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Jun 2021 15:46:22 +0200 Subject: [PATCH 006/435] Bump mockito-core from 3.10.0 to 3.11.0 (#258) Bumps [mockito-core](https://github.com/mockito/mockito) from 3.10.0 to 3.11.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v3.10.0...v3.11.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 99d1b51d..39f46712 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -42,7 +42,7 @@ 5.7.2 1.4.2 1.1.3 - 3.10.0 + 3.11.0 4.1.0 2.17.0 From c3cf0a3672a76c411b24f1de89ae6a6fb48d61c5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Jun 2021 09:25:12 +0200 Subject: [PATCH 007/435] Bump mockito-core from 3.11.0 to 3.11.1 (#260) Bumps [mockito-core](https://github.com/mockito/mockito) from 3.11.0 to 3.11.1. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v3.11.0...v3.11.1) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 39f46712..c6ecb167 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -42,7 +42,7 @@ 5.7.2 1.4.2 1.1.3 - 3.11.0 + 3.11.1 4.1.0 2.17.0 From 58062bd556a136a500c57380461ab4fa843661f4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Jun 2021 11:33:06 +0200 Subject: [PATCH 008/435] Bump dagger.version from 2.36 to 2.37 (#259) Bumps `dagger.version` from 2.36 to 2.37. Updates `dagger` from 2.36 to 2.37 - [Release notes](https://github.com/google/dagger/releases) - [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md) - [Commits](https://github.com/google/dagger/compare/dagger-2.36...dagger-2.37) Updates `dagger-compiler` from 2.36 to 2.37 - [Release notes](https://github.com/google/dagger/releases) - [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md) - [Commits](https://github.com/google/dagger/compare/dagger-2.36...dagger-2.37) --- updated-dependencies: - dependency-name: com.google.dagger:dagger dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: com.google.dagger:dagger-compiler dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index c6ecb167..b55c1463 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -35,7 +35,7 @@ 1.7.30 5.0.4 - 2.36 + 2.37 2.12.3 1.5.10 From 3d6a1c48119c00f72bfb7fb19179eebac472a37a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Mon, 23 Aug 2021 15:40:03 +0200 Subject: [PATCH 009/435] Implement more cli parameters for cli-protonj2 (#271) * pass browse tests and ability to send list message; ability to not receive message ;P * handle tts and map message (without correct types, so far) * all except three JAMQMsgPatterns000Tests passing now * tests.JAMQMsgPatterns000Tests.JAMQMsgPatternsTests.test_publish_subscribe_map_list * tests.JAMQMsgPatterns000Tests.JAMQMsgPatternsTests.test_dead_letter_queue_with_expired_messages_jamq6 * tests.JAMQMsgPatterns000Tests.JAMQMsgPatternsTests.test_message_group_consumer_disconnect * pass 20+ JAMQNode000Tests; plenty still failing tho * pass plenty JAMQMessage000Tests, more work needed --- cli-protonj2/pom.xml | 8 + .../main/java/com/redhat/mqe/ContentType.java | 35 ++ .../java/com/redhat/mqe/DurationMode.java | 35 ++ .../src/main/java/com/redhat/mqe/Main.java | 319 +++++++++++++++++- .../main/java/com/redhat/mqe/SsnAckMode.java | 26 ++ .../test/java/com/redhat/mqe/MainTest.java | 84 ++++- 6 files changed, 489 insertions(+), 18 deletions(-) create mode 100644 cli-protonj2/src/main/java/com/redhat/mqe/ContentType.java create mode 100644 cli-protonj2/src/main/java/com/redhat/mqe/DurationMode.java create mode 100644 cli-protonj2/src/main/java/com/redhat/mqe/SsnAckMode.java diff --git a/cli-protonj2/pom.xml b/cli-protonj2/pom.xml index 9bade6b0..32202c59 100644 --- a/cli-protonj2/pom.xml +++ b/cli-protonj2/pom.xml @@ -122,6 +122,14 @@ org.apache.maven.plugins maven-shade-plugin + + org.apache.maven.plugins + maven-compiler-plugin + + 11 + 11 + + diff --git a/cli-protonj2/src/main/java/com/redhat/mqe/ContentType.java b/cli-protonj2/src/main/java/com/redhat/mqe/ContentType.java new file mode 100644 index 00000000..f2105971 --- /dev/null +++ b/cli-protonj2/src/main/java/com/redhat/mqe/ContentType.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2021 Red Hat, Inc. + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 + * + * http://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 com.redhat.mqe; + +public enum ContentType { + INT("int"); + + private final String value; + + ContentType(String s) { + this.value = s; + } + + @Override + public String toString() { + return value; + } +} diff --git a/cli-protonj2/src/main/java/com/redhat/mqe/DurationMode.java b/cli-protonj2/src/main/java/com/redhat/mqe/DurationMode.java new file mode 100644 index 00000000..bbc86659 --- /dev/null +++ b/cli-protonj2/src/main/java/com/redhat/mqe/DurationMode.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2021 Red Hat, Inc. + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 + * + * http://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 com.redhat.mqe; + +public enum DurationMode { + afterReceive("after-receive"); + + private final String value; + + @Override + public String toString() { + return value; + } + + DurationMode(String s) { + this.value = s; + } +} diff --git a/cli-protonj2/src/main/java/com/redhat/mqe/Main.java b/cli-protonj2/src/main/java/com/redhat/mqe/Main.java index c421fa34..230eaf5c 100644 --- a/cli-protonj2/src/main/java/com/redhat/mqe/Main.java +++ b/cli-protonj2/src/main/java/com/redhat/mqe/Main.java @@ -1,7 +1,8 @@ package com.redhat.mqe; -import com.redhat.mqe.lib.ClientOptions; -import com.redhat.mqe.lib.ConnectionManager; +import com.redhat.mqe.lib.JmsMessagingException; +import org.apache.qpid.protonj2.client.ClientOptions; +import org.apache.qpid.protonj2.client.DistributionMode; import org.apache.qpid.protonj2.client.ReceiverOptions; import org.apache.qpid.protonj2.client.SenderOptions; import org.apache.qpid.protonj2.client.exceptions.ClientException; @@ -22,12 +23,17 @@ import java.math.BigInteger; import java.net.URI; import java.nio.file.Files; +import java.nio.file.Paths; import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.concurrent.Callable; import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; import static com.redhat.mqe.lib.ClientOptionManager.QUEUE_PREFIX; import static com.redhat.mqe.lib.ClientOptionManager.TOPIC_PREFIX; @@ -58,7 +64,7 @@ public static void main(String... args) { } class CliProtonJ2SenderReceiver { - void logMessage(String address, Message message) throws ClientException { + void logMessage(String address, Message message, boolean msgContentHashed) throws ClientException { StringBuilder sb = new StringBuilder(); sb.append("{"); @@ -73,7 +79,18 @@ void logMessage(String address, Message message) throws ClientException addKeyValue(sb, "type", "string"); // ??? addKeyValue(sb, "ttl", message.timeToLive()); addKeyValue(sb, "absolute-expiry-time", message.absoluteExpiryTime()); - addKeyValue(sb, "content", message.body()); + if (msgContentHashed) { + // this is inlined addKeyValue, TODO do it nicer + sb.append("'"); + sb.append("content"); + sb.append("': "); + sb.append("'"); // extra quotes to format + sb.append(hash(formatPython(message.body()))); + sb.append("'"); + sb.append(", "); + } else { + addKeyValue(sb, "content", message.body()); + } addKeyValue(sb, "redelivered", message.deliveryCount() > 1); addKeyValue(sb, "reply-to-group-id", message.replyToGroupId()); addKeyValue(sb, "durable", message.durable()); @@ -92,7 +109,7 @@ void logMessage(String address, Message message) throws ClientException // sbb.append(", "); // first.set(false); // } - addKeyValue(sbb, s, o); + addKeyValue(sbb, (String) s, o); // this wanted to cast to string when I removed message generic type; what??? TODO }); if (message.hasProperties()) { sbb.delete(sbb.length() - 2, sbb.length()); // remove last ", " @@ -128,7 +145,66 @@ String formatPython(Object parameter) { if (parameter instanceof StringBuilder) { return parameter.toString(); } - return "'" + parameter + "'"; + if (parameter instanceof List) { + return "[" + ((List) parameter).stream().map(this::formatPython).collect(Collectors.joining(", ")) + "]"; + } + return "'" + parameter + "'"; + } + + protected boolean stringToBool(String string) { + boolean bool = string.equalsIgnoreCase("true") || string.equalsIgnoreCase("yes"); + return bool; + } + + private String hash(Object o) { + if (o == null) { + return null; // no point in hashing this value + } + MessageDigest md; + try { + md = MessageDigest.getInstance("SHA-1"); + } catch (NoSuchAlgorithmException e) { + throw new JmsMessagingException("Unable to hash message", e); + } + String content = o.toString(); + return new BigInteger(1, md.digest(content.getBytes())).toString(16); + } + + // can't call these as implemented in Utils, undefined JmsException; somehow fix this; break dep on jms api + + /** + * @return number of seconds (including milisecs) since EPOCH. + */ + public static double getTime() { + return System.currentTimeMillis(); + } + + + /** + * Sleeps until next timed for/while loop iteration. + * This method takes into account the length of the action it preceded. + * + * @param initialTimestamp initial timestamp (in get_time() double form) is passed from a connection started + * @param msgCount number of iterations + * @param duration total time of all iterations + * @param nextCountIndex next iteration index + */ + + public static void sleepUntilNextIteration(double initialTimestamp, int msgCount, double duration, int nextCountIndex) { + if ((duration > 0) && (msgCount > 0)) { + // initial overall duration approximation of whole loop (sender/receiver) + double cummulative_dur = (1.0 * nextCountIndex * duration) / msgCount; + while (true) { + if (getTime() - initialTimestamp - cummulative_dur > -0.05) + break; + try { +// LOG.trace("sleeping"); + Thread.sleep(100); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + } } } @@ -194,6 +270,9 @@ class CliProtonJ2Sender extends CliProtonJ2SenderReceiver implements Callable connAuthMechanisms = new ArrayList<>(); @Option(names = {"--msg-property"}) // picocli Map options works for this, sounds like @@ -221,9 +304,59 @@ class CliProtonJ2Sender extends CliProtonJ2SenderReceiver implements Callable msgContentListItem; + + @Option(names = {"--msg-content-map-item"}) + private List msgContentMapItems; + @Option(names = {"--msg-correlation-id"}) private String msgCorrelationId; + @Option(names = {"--msg-group-id"}) + private String msgGroupId; + + @Option(names = {"--msg-id"}) + private String msgId; // todo, not just string is an option + + @Option(names = {"--msg-reply-to"}) + private String msgReplyTo; + + @Option(names = {"--msg-subject"}) + private String msgSubject; + + @Option(names = {"--msg-user-id"}) + private String msgUserId; + + @Option(names = {"--msg-priority"}) + private Byte msgPriority; + + // jms.populateJMSXUserID opt in qpid-jms + // TODO: does not seem to have equivalent; what is the threat model for "prevent spoofing" in JMS docs? + @Option(names = {"--conn-populate-user-id"}) + private String connPopulateUserIdString = "false"; + + @Option(names = {"--msg-group-seq"}) + private Integer msgGroupSeq; + + @Option(names = {"--msg-reply-to-group-id"}) + private String msgReplyToGroupId; + + @Option(names = {"--ssn-ack-mode"}) + private SsnAckMode ssnAckMode; + @Override public Integer call() throws Exception { // your business logic goes here... @@ -264,9 +397,27 @@ public Integer call() throws Exception { // your business logic goes here... Sender sender = connection.openSender(address, senderOptions)) { for (int i = 0; i < count; i++) { - final Message message = Message.create(msgContent); + Message message; + if (msgContentListItem != null && !msgContentListItem.isEmpty()) { // TODO check only one of these is specified + // TODO have to cast strings to objects of correct types + message = Message.create(msgContentListItem); + } else if (msgContentMapItems != null) { + Map map = new HashMap<>(); + for (String item : msgContentMapItems) { + String[] fields = item.split("[=~]", 2); + if (fields.length != 2) { + throw new RuntimeException("Wrong format " + Arrays.toString(fields)); // TODO do this in args parsing? + } + map.put(fields[0], fields[1]); // todo retype value + } + message = Message.create(map); + } else if (msgContentFromFile != null) { + message = Message.create(Files.readString(Paths.get(msgContentFromFile))); // todo maybe param type as Path? check exists + } else { + message = Message.create(msgContent); + } for (String property : msgProperties) { - String[] fields = property.split("=", 2); + String[] fields = property.split("[=~]", 2); // todo do something with ~ if (fields.length != 2) { throw new RuntimeException("Wrong format " + Arrays.toString(fields)); // TODO do this in args parsing } @@ -274,11 +425,45 @@ public Integer call() throws Exception { // your business logic goes here... String value = fields[1]; // more types message.property(key, value); } + if (msgId != null) { + message.messageId(msgId); + } if (msgCorrelationId != null) { message.correlationId(msgCorrelationId); } + if (msgTtl != null) { + message.timeToLive(msgTtl); + } + if (stringToBool(msgDurableString)) { + message.durable(true); + } + if (msgGroupId != null) { + message.groupId(msgGroupId); + } + if (msgGroupSeq != null) { + message.groupSequence(msgGroupSeq); + } + if (msgReplyTo != null) { + message.replyTo(msgReplyTo); + } + if (msgReplyToGroupId != null) { + message.replyToGroupId(msgReplyToGroupId); + } + if (contentType != null) { + message.contentType(contentType.toString()); // TODO: maybe should do more with it? don't bother with enum? + } + // todo, not sure what to do here; should I use authenticated userid instead? + if (stringToBool(connPopulateUserIdString)) { + message.userId(msgUserId.getBytes()); + } + if (msgSubject != null) { + message.subject(msgSubject); + } + if (msgPriority != null) { + message.priority(msgPriority); + } sender.send(message); // TODO what's timeout for in a sender? - logMessage(address, message); + logMessage(address, message, stringToBool(msgContentHashedString)); } } @@ -297,6 +482,9 @@ class CliProtonJ2Receiver extends CliProtonJ2SenderReceiver implements Callable< @Option(names = {"--log-msgs"}, description = "MD5, SHA-1, SHA-256, ...") private String logMsgs = "MD5"; + @Option(names = {"--msg-content-hashed"}) + private String msgContentHashedString = "false"; + @Option(names = {"--broker"}, description = "MD5, SHA-1, SHA-256, ...") private String broker = "MD5"; @@ -306,18 +494,47 @@ class CliProtonJ2Receiver extends CliProtonJ2SenderReceiver implements Callable< @Option(names = {"--conn-password"}, description = "MD5, SHA-1, SHA-256, ...") private String connPassword = "MD5"; + @Option(names = {"--conn-clientid"}) + private String connClientId; + + @Option(names = {"--durable-subscriber"}) + private String durableSubscriberString = "false"; + + @Option(names = {"--durable-subscriber-name"}) + private String durableSubscriberName; + + // TODO not implemented + @Option(names = {"--subscriber-unsubscribe"}) + private String subscriberUnsubscribeString; + @Option(names = {"--address"}, description = "MD5, SHA-1, SHA-256, ...") private String address = "MD5"; + @Option(names = {"--recv-browse"}, description = "browse queued messages instead of receiving them") + private String recvBrowseString = "false"; + @Option(names = {"--count"}, description = "MD5, SHA-1, SHA-256, ...") private int count = 1; @Option(names = {"--timeout"}, description = "MD5, SHA-1, SHA-256, ...") private int timeout; - @Option(names = {"--conn-auth-mechanisms"}, description = "MD5, SHA-1, SHA-256, ...") // todo, want to accept comma-separated lists; there is https://picocli.info/#_split_regex + @Option(names = {"--conn-auth-mechanisms"}, description = "MD5, SHA-1, SHA-256, ...") + // todo, want to accept comma-separated lists; there is https://picocli.info/#_split_regex private List connAuthMechanisms = new ArrayList<>(); + @Option(names = {"--process-reply-to"}) + private boolean processReplyTo = false; + + @Option(names = {"--duration"}) // todo + private Integer duration; + + @Option(names = {"--duration-mode"}) // todo + private DurationMode durationMode; + + @Option(names = {"--ssn-ack-mode"}) + private SsnAckMode ssnAckMode; + @Override public Integer call() throws Exception { // your business logic goes here... String prefix = ""; @@ -338,7 +555,22 @@ public Integer call() throws Exception { // your business logic goes here... address = address.substring((QUEUE_PREFIX.length())); } - final Client client = Client.create(); + ClientOptions clientOptions = new ClientOptions(); + // TODO api usability I had to hunt for this a bit; the idea is to have durable subscription: need specify connection id and subscriber name + if (connClientId != null) { + clientOptions.id(connClientId); + } + + // TODO api usability; If I use the w/ clientOptions variant of Client.create, then .id defaults to null, and I get exception; + // ok, that just cannot be true ^^^; but it looks to be true; what!?! + // aha, right; constructor does not check, factory method does check for null + // proposed solution: allow null there, and let it mean autoassign; or tell us method to generate ID ourselves if we don't care + Client client; + if (clientOptions.id() != null) { + client = Client.create(clientOptions); + } else { + client = Client.create(); + } final ConnectionOptions options = new ConnectionOptions(); options.user(connUsername); @@ -348,15 +580,41 @@ public Integer call() throws Exception { // your business logic goes here... } /* - TODO API usablility, hard to ask for queue when dealing with broker that likes to autocreate topics + TODO API usability, hard to ask for queue when dealing with broker that likes to autocreate topics */ ReceiverOptions receiverOptions = new ReceiverOptions(); // is it target or source? target. receiverOptions.sourceOptions().capabilities(destinationCapability); - try (Connection connection = client.connect(serverHost, serverPort, options); - Receiver receiver = connection.openReceiver(address, receiverOptions)) { + // todo: another usability, little hard to figure out this is analogue of jms to browse queues + if (stringToBool(recvBrowseString)) { + receiverOptions.sourceOptions().distributionMode(DistributionMode.COPY); + } + + // TODO: API question: what is difference between autoSettle and autoAccept? why I want one but not the other? + if(ssnAckMode != null) { + if (ssnAckMode == SsnAckMode.client) { + receiverOptions.autoAccept(false); + receiverOptions.autoSettle(false); + } + } + + try (Connection connection = client.connect(serverHost, serverPort, options)) { + Receiver receiver; + if (stringToBool(durableSubscriberString)) { + receiver = connection.openDurableReceiver(address, durableSubscriberName, receiverOptions); + } else { + receiver = connection.openReceiver(address, receiverOptions); + } + + double initialTimestamp = getTime(); for (int i = 0; i < count; i++) { + +// if (durationMode == DurationMode.sleepBeforeReceive) { +// LOG.trace("Sleeping before receive"); +// Utils.sleepUntilNextIteration(initialTimestamp, msgCount, duration, i + 1); +// } + final Delivery delivery; if (timeout == 0) { delivery = receiver.receive(); // todo: can default it to -1 @@ -364,12 +622,41 @@ public Integer call() throws Exception { // your business logic goes here... delivery = receiver.receive(timeout, TimeUnit.SECONDS); } + if (delivery == null) { + break; + } + + if (durationMode == DurationMode.afterReceive) { +// LOG.trace("Sleeping after receive"); + sleepUntilNextIteration(initialTimestamp, count, duration, i + 1); + } + + if (processReplyTo && delivery.message().replyTo() != null) { + String replyTo = delivery.message().replyTo(); + Message message = delivery.message(); + message.replyTo(null); + try (Sender sender = connection.openSender(replyTo)) { + sender.send(message); + } + } + int messageFormat = delivery.messageFormat(); Message message = delivery.message(); - logMessage(address, message); + + // todo, is this what we mean? + if (ssnAckMode != null && ssnAckMode == SsnAckMode.client) { + delivery.accept(); + } + + logMessage(address, message, stringToBool(msgContentHashedString)); } + + // TODO API usability, how do I do durable subscription with detach, resume, etc; no mention of unsubscribe in the client anywhere + receiver.close(); // TODO want to do autoclosable, need helper func, that's all +// receiver.detach(); } return 0; } + } diff --git a/cli-protonj2/src/main/java/com/redhat/mqe/SsnAckMode.java b/cli-protonj2/src/main/java/com/redhat/mqe/SsnAckMode.java new file mode 100644 index 00000000..c09ec49a --- /dev/null +++ b/cli-protonj2/src/main/java/com/redhat/mqe/SsnAckMode.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2021 Red Hat, Inc. + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 + * + * http://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 com.redhat.mqe; + +public enum SsnAckMode { + auto, + client, +// dups_ok, // todo we probably don't have equivalent of this here // https://www.ibm.com/docs/en/ibm-mq/8.0?topic=session-acknowledgement-modes +} diff --git a/cli-protonj2/src/test/java/com/redhat/mqe/MainTest.java b/cli-protonj2/src/test/java/com/redhat/mqe/MainTest.java index 4eba5bd2..219d031c 100644 --- a/cli-protonj2/src/test/java/com/redhat/mqe/MainTest.java +++ b/cli-protonj2/src/test/java/com/redhat/mqe/MainTest.java @@ -22,9 +22,7 @@ import com.google.common.truth.Truth; import kotlin.jvm.functions.Function0; import kotlin.jvm.internal.Intrinsics; -import kotlin.test.AssertionsKt; import org.jetbrains.annotations.NotNull; -import org.junit.Assert; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; @@ -164,4 +162,86 @@ void testAckWithSessionClose(@BrokerFixture.TempBroker Broker broker) throws Thr checkMainInvocation("sender --log-msgs dict --broker " + brokerUrl + " --conn-auth-mechanisms PLAIN --conn-username admin --conn-password admin --address topic://test_publish_subscribe_string --count 3 --msg-content ABC --msg-correlation-id some-corr-id"); t.join(); } + + @Test + @Timeout(value = 60, unit = TimeUnit.SECONDS) + @ExtendWith(BrokerFixture.class) + void test2(@BrokerFixture.TempBroker Broker broker) throws Throwable { + broker.configuration.setSecurityEnabled(false); + broker.configuration.setPersistenceEnabled(false); // this, or tmpdir, otherwise test runs interact + broker.startBroker(); + + // todo: have to handle amqp:// prefix + String brokerUrl = "localhost:" + broker.addAMQPAcceptor(); + + + checkMainInvocation("receiver --timeout 2 --log-msgs dict --broker " + brokerUrl + " --conn-auth-mechanisms PLAIN --conn-username admin --conn-password admin --address JAMQMsgPatterns111Tests_test_browse_messages --recv-browse true --count 20"); + + // tests.JAMQMsgPatterns000Tests.JAMQMsgPatternsTests.test_direct_transient_list_message + checkMainInvocation("sender --log-msgs dict --broker " + brokerUrl + " --conn-auth-mechanisms PLAIN --conn-username admin --conn-password admin --address test_direct_transient_list_message --count 1 --msg-content-list-item --msg-content-list-item String --msg-content-list-item ~1 --msg-content-list-item ~1.0 --msg-content-list-item 1 --msg-content-list-item 1.0 --msg-content-list-item ~-1 --msg-content-list-item ~-1.3 --msg-content-list-item -1 --msg-content-list-item ~~1 --msg-correlation-id corr-id-Mee2YQ"); + + // tests.JAMQMsgPatterns000Tests.JAMQMsgPatternsTests.test_direct_transient_map_message + checkMainInvocation("sender --log-msgs dict --broker " + brokerUrl + " --conn-auth-mechanisms PLAIN --conn-username admin --conn-password admin --address test_direct_transient_map_message --count 1 --msg-content-map-item empty_string= --msg-content-map-item string=String --msg-content-map-item int~1 --msg-content-map-item float~1.0 --msg-content-map-item string_int=1 --msg-content-map-item string_float=1.0 --msg-content-map-item negative_int~-1 --msg-content-map-item negative_float~-1.3 --msg-content-map-item string_negative_int=-1 --msg-content-map-item string_retype_operator=~1 --msg-correlation-id corr-id-JQt4JM"); + + // tests.JAMQMsgPatterns000Tests.JAMQMsgPatternsTests.test_dead_letter_queue_with_expired_messages + checkMainInvocation("sender --log-msgs dict --broker " + brokerUrl + " --conn-auth-mechanisms PLAIN --conn-username admin --conn-password admin --address test_dead_letter_queue_with_expired_messages --count 3 --msg-content ABC --msg-durable yes --msg-ttl 1000"); + + // tests.JAMQMsgPatterns000Tests.JAMQMsgPatternsTests.test_message_group_simple + checkMainInvocation("sender --log-msgs dict --broker " + brokerUrl + " --conn-auth-mechanisms PLAIN --conn-username admin --conn-password admin --address test_message_group_simple --count 1 --msg-content B-0 --msg-group-id B"); + + // tests.JAMQMsgPatterns000Tests.JAMQMsgPatternsTests.test_reply_to_address + checkMainInvocation("sender --log-msgs dict --broker " + brokerUrl + " --conn-auth-mechanisms PLAIN --conn-username admin --conn-password admin --address test_reply_to_address --count 1 --msg-reply-to test_reply_to_address-replyQ --msg-content-map-item text=replyQ_SLjFkenkBi"); + + // tests.JAMQMsgPatterns000Tests.JAMQMsgPatternsTests.test_publish_subscribe_int + checkMainInvocation("sender --log-msgs dict --broker " + brokerUrl + " --conn-auth-mechanisms PLAIN --conn-username admin --conn-password admin --address topic://test_publish_subscribe_int --count 3 --msg-content 12345 --content-type int --msg-correlation-id some-corr-id"); + + // tests.JAMQMsgPatterns000Tests.JAMQMsgPatternsTests.test_publish_subscribe_map_list + // --msg-content-map-item "key3~[123, 3.14]" + + // tests.JAMQMsgPatterns000Tests.JAMQMsgPatternsTests.test_message_group_consumer_disconnect + // TODO msgcontent %d feature + checkMainInvocation("sender --log-msgs dict --broker " + brokerUrl + " --conn-auth-mechanisms PLAIN --conn-username admin --conn-password admin --address test_message_group_consumer_disconnect --count 40 --msg-content A-%d --duration 20 --msg-group-id A"); + + // tests.JAMQMsgPatterns000Tests.JAMQMsgPatternsTests.test_reply_to_address + checkMainInvocation("receiver --timeout 5 --log-msgs dict --broker " + brokerUrl + " --conn-auth-mechanisms PLAIN --conn-username admin --conn-password admin --address test_reply_to_address --count 1 --process-reply-to"); + + // tests.JAMQNode000Tests.JAMQNodeTests.test_address_full_policy_block + checkMainInvocation("sender --log-msgs dict --broker " + brokerUrl + " --conn-auth-mechanisms PLAIN --conn-username admin --conn-password admin --address JAMQNode111Tests_test_address_full_policy_block --count 1 --msg-content-from-file /etc/passwd"); + + // tests.JAMQNode000Tests.JAMQNodeTests.test_direct_transient_large_string_message_size_1mb + // ditto for receiver + checkMainInvocation("sender --log-msgs dict --broker " + brokerUrl + " --conn-auth-mechanisms PLAIN --conn-username admin --conn-password admin --address test_direct_transient_large_string_message_size_1mb --count 1 --msg-content-from-file /etc/passwd --msg-content-hashed True"); + + // tests.JAMQNode000Tests.JAMQNodeTests.test_max_consumers_queue + // TODO: client is not started at all in the test; some issues with params mapping? + + // tests.JAMQNode000Tests.JAMQNodeTests.test_node_durable_topic_subscriber + // topic: prefix, --conn-clientid --durable-subscriber --durable-subscriber-name + checkMainInvocation("receiver --timeout 5 --log-msgs dict --broker " + brokerUrl + " --conn-auth-mechanisms PLAIN --conn-username admin --conn-password admin --address topic://test_node_durable_topic_subscriber --count 0 --durable-subscriber True --durable-subscriber-name ds0"); + // --subscriber-unsubscribe True + checkMainInvocation("receiver --timeout 5 --log-msgs dict --broker " + brokerUrl + " --conn-auth-mechanisms PLAIN --conn-username admin --conn-password admin --address topic://test_node_durable_topic_subscriber --count 0 --subscriber-unsubscribe True --durable-subscriber-name ds0"); + + // tests.JAMQMessage000Tests.JAMQMessageTests.test_amqp_bare_message_consistency + // Unknown options: '--msg-subject', 'amqp_bare_message_test', '--msg-user-id', 'admin', '--msg-priority', '7', '--conn-populate-user-id', 'True', '--msg-group-seq', '1', '--msg-reply-to-group-id', 'group-a' + checkMainInvocation("sender --log-msgs dict --broker " + brokerUrl + " --conn-auth-mechanisms PLAIN --conn-username admin --conn-password admin --address test_amqp_bare_message_consistency --count 1 --msg-subject amqp_bare_message_test --msg-reply-to ExpiryQueue --msg-property PI=~3.141592 --msg-property color=red --msg-property mapKey=mapValue --msg-content amqp_bare_msg-CBJJIY --msg-durable True --msg-ttl 300000 --msg-correlation-id amqp_bare_msg-CBJJIY --msg-user-id admin --msg-priority 7 --conn-populate-user-id True --msg-group-id group-a --msg-group-seq 1 --msg-reply-to-group-id group-a"); + + // tests.JAMQMessage000Tests.JAMQMessageTests.test_populate_validated_user_option + // FAIL dtestlib.Test:levels.py:61 Checking properties keys for validated user with expected '_AMQ_VALIDATED_USER' or 'JMSXUserID': dict_keys([]) # result:False (exp. True), dur.:-1.00 err_cnt:1 + + // tests.JAMQMessage000Tests.JAMQMessageTests.test_scheduled_message_zero_timestamp + // Unknown options: '--msg-id' + checkMainInvocation("sender --log-msgs dict --broker " + brokerUrl + " --conn-auth-mechanisms PLAIN --conn-username admin --conn-password admin --address JAMQMessage111Tests_test_scheduled_message_zero_timestamp --count 2 --msg-id ReferenceMessage_JAMQMessage111Tests_test_scheduled_message_zero_timestamp --msg-property _AMQ_SCHED_DELIVERY~0"); + + // tests.JAMQMessage000Tests.JAMQMessageTests.test_client_acknowledge_inactivity_exception + // --ssn-ack-mode + // --duration --duration-mode --ssn-ack-mode + checkMainInvocation("sender --log-msgs dict --broker " + brokerUrl + " --conn-auth-mechanisms PLAIN --conn-username admin --conn-password admin --address test_client_acknowledge_inactivity_exception --count 20 --msg-durable True --ssn-ack-mode client"); + checkMainInvocation("receiver --timeout 10 --log-msgs dict --broker " + brokerUrl + " --conn-auth-mechanisms PLAIN --conn-username admin --conn-password admin --address test_client_acknowledge_inactivity_exception --count 20 --duration 100 --duration-mode after-receive --ssn-ack-mode client"); + + //checkMainInvocation("sender --log-msgs dict --broker " + brokerUrl + " --conn-auth-mechanisms PLAIN --conn-username admin --conn-password admin --address test_direct_transient_text_message --count 1 --msg-content SimpleTextMessage --msg-correlation-id corr-id-eqa9vp"); + } + +// void testMessageContentListItem() { +// '--msg-content-list-item', '', '--msg-content-list-item', 'String', '--msg-content-list-item', '~1', '--msg-content-list-item', '~1.0', '--msg-content-list-item', '1', '--msg-content-list-item', '1.0', '--msg-content-list-item', '~-1', '--msg-content-list-item', '~-1.3', '--msg-content-list-item', '-1', '--msg-content-list-item', '~~1' +// } } From 791959ba0ed4356ef50f0118cf0eadb49f24cd8f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 15:46:00 +0200 Subject: [PATCH 010/435] Bump mockito-core from 3.11.1 to 3.12.1 (#270) Bumps [mockito-core](https://github.com/mockito/mockito) from 3.11.1 to 3.12.1. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v3.11.1...v3.12.1) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index b55c1463..5da47fd5 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -42,7 +42,7 @@ 5.7.2 1.4.2 1.1.3 - 3.11.1 + 3.12.1 4.1.0 2.17.0 From f59b6e6eb726fa7459038256aca34dac1d923d85 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 15:48:48 +0200 Subject: [PATCH 011/435] Bump jackson-databind from 2.12.3 to 2.12.4 (#274) Bumps [jackson-databind](https://github.com/FasterXML/jackson) from 2.12.3 to 2.12.4. - [Release notes](https://github.com/FasterXML/jackson/releases) - [Commits](https://github.com/FasterXML/jackson/commits) --- updated-dependencies: - dependency-name: com.fasterxml.jackson.core:jackson-databind dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 5da47fd5..97ea78a9 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -36,7 +36,7 @@ 1.7.30 5.0.4 2.37 - 2.12.3 + 2.12.4 1.5.10 5.7.2 From 24c5f0a3874c6130f28efdbe5a532d7fd94830c9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 15:52:33 +0200 Subject: [PATCH 012/435] Bump tcnative.version from 2.0.39.Final to 2.0.41.Final (#272) Bumps `tcnative.version` from 2.0.39.Final to 2.0.41.Final. Updates `netty-tcnative-boringssl-static` from 2.0.39.Final to 2.0.41.Final - [Release notes](https://github.com/netty/netty-tcnative/releases) - [Commits](https://github.com/netty/netty-tcnative/compare/netty-tcnative-parent-2.0.39.Final...netty-tcnative-parent-2.0.41.Final) Updates `netty-tcnative` from 2.0.39.Final to 2.0.41.Final - [Release notes](https://github.com/netty/netty-tcnative/releases) - [Commits](https://github.com/netty/netty-tcnative/compare/netty-tcnative-parent-2.0.39.Final...netty-tcnative-parent-2.0.41.Final) --- updated-dependencies: - dependency-name: io.netty:netty-tcnative-boringssl-static dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.netty:netty-tcnative:linux-x86_64-fedora dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cli-qpid-jms/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-qpid-jms/pom.xml b/cli-qpid-jms/pom.xml index 029e268c..528ef05b 100644 --- a/cli-qpid-jms/pom.xml +++ b/cli-qpid-jms/pom.xml @@ -37,7 +37,7 @@ com.redhat.mqe.jms.Main 1.0.0 ${qpid.jms.client.version} - 2.0.39.Final + 2.0.41.Final linux-x86_64-fedora 1.6.0 From 7901787c2ab665d8fac51f4fc7d5d4a56fc06b5c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 15:56:46 +0200 Subject: [PATCH 013/435] Bump kotlin.version from 1.5.10 to 1.5.21 (#273) Bumps `kotlin.version` from 1.5.10 to 1.5.21. Updates `kotlin-stdlib` from 1.5.10 to 1.5.21 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.10...v1.5.21) Updates `kotlin-stdlib-jdk8` from 1.5.10 to 1.5.21 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.10...v1.5.21) Updates `kotlin-test-junit` from 1.5.10 to 1.5.21 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.10...v1.5.21) Updates `kotlin-maven-plugin` from 1.5.10 to 1.5.21 Updates `kotlin-reflect` from 1.5.10 to 1.5.21 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.10...v1.5.21) --- updated-dependencies: - dependency-name: org.jetbrains.kotlin:kotlin-stdlib dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-stdlib-jdk8 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-test-junit dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-reflect dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 97ea78a9..adc42972 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -38,7 +38,7 @@ 2.37 2.12.4 - 1.5.10 + 1.5.21 5.7.2 1.4.2 1.1.3 From 4621b9a76a434a632e26ee8fd581623a80e13f37 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 16:01:33 +0200 Subject: [PATCH 014/435] Bump annotations from 21.0.1 to 22.0.0 (#278) Bumps [annotations](https://github.com/JetBrains/java-annotations) from 21.0.1 to 22.0.0. - [Release notes](https://github.com/JetBrains/java-annotations/releases) - [Changelog](https://github.com/JetBrains/java-annotations/blob/master/CHANGELOG.md) - [Commits](https://github.com/JetBrains/java-annotations/compare/21.0.1...22.0.0) --- updated-dependencies: - dependency-name: org.jetbrains:annotations dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index adc42972..59e9eda8 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -56,7 +56,7 @@ 3.0.0-M5 2.7 - 21.0.1 + 22.0.0 3.14.0 From 65e25b9620d77e3c46bf4c82ffd9dab808ab33e2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 16:04:49 +0200 Subject: [PATCH 015/435] Bump checker-qual from 3.14.0 to 3.17.0 (#268) Bumps [checker-qual](https://github.com/typetools/checker-framework) from 3.14.0 to 3.17.0. - [Release notes](https://github.com/typetools/checker-framework/releases) - [Changelog](https://github.com/typetools/checker-framework/blob/master/docs/CHANGELOG.md) - [Commits](https://github.com/typetools/checker-framework/compare/checker-framework-3.14.0...checker-framework-3.17.0) --- updated-dependencies: - dependency-name: org.checkerframework:checker-qual dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 59e9eda8..6f505ba5 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -57,7 +57,7 @@ 2.7 22.0.0 - 3.14.0 + 3.17.0 From 3d949bbc412d150f01c7935c7b7c209e0a1c2a56 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 16:08:20 +0200 Subject: [PATCH 016/435] Bump slf4j-log4j12 from 1.7.30 to 1.7.32 (#267) Bumps [slf4j-log4j12](https://github.com/qos-ch/slf4j) from 1.7.30 to 1.7.32. - [Release notes](https://github.com/qos-ch/slf4j/releases) - [Commits](https://github.com/qos-ch/slf4j/commits) --- updated-dependencies: - dependency-name: org.slf4j:slf4j-log4j12 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 6f505ba5..ced3fed4 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -33,7 +33,7 @@ pom - 1.7.30 + 1.7.32 5.0.4 2.37 2.12.4 From f3b21aebdb10a5705450ea2fc7a413cf87768d36 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 16:16:59 +0200 Subject: [PATCH 017/435] Bump maven-enforcer-plugin from 3.0.0-M3 to 3.0.0 (#280) Bumps [maven-enforcer-plugin](https://github.com/apache/maven-enforcer) from 3.0.0-M3 to 3.0.0. - [Release notes](https://github.com/apache/maven-enforcer/releases) - [Commits](https://github.com/apache/maven-enforcer/compare/enforcer-3.0.0-M3...enforcer-3.0.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-enforcer-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index ced3fed4..1d5bccdf 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -49,7 +49,7 @@ 3.8.1 3.1.0 - 3.0.0-M3 + 3.0.0 3.2.0 0.8.7 3.2.4 From 3d710b8552ffa6e0338c7be954829fc70e10f573 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 17:31:36 +0200 Subject: [PATCH 018/435] Bump activemq-client from 5.16.2 to 5.16.3 (#277) Bumps [activemq-client](https://github.com/apache/activemq) from 5.16.2 to 5.16.3. - [Release notes](https://github.com/apache/activemq/releases) - [Commits](https://github.com/apache/activemq/compare/activemq-5.16.2...activemq-5.16.3) --- updated-dependencies: - dependency-name: org.apache.activemq:activemq-client dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cli-activemq/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-activemq/pom.xml b/cli-activemq/pom.xml index e1b24729..f059bff8 100644 --- a/cli-activemq/pom.xml +++ b/cli-activemq/pom.xml @@ -35,7 +35,7 @@ aoc com.redhat.mqe.aoc.Main - 5.16.2 + 5.16.3 ${activemq.client.version} From 8c73a08684d1e7bdc249d5c2333130f367bee392 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 17:49:46 +0200 Subject: [PATCH 019/435] Bump qpid-jms-parent from 1.0.0 to 1.1.0 (#282) Bumps qpid-jms-parent from 1.0.0 to 1.1.0. --- updated-dependencies: - dependency-name: org.apache.qpid:qpid-jms-parent dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cli-qpid-jms/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-qpid-jms/pom.xml b/cli-qpid-jms/pom.xml index 528ef05b..04a8772d 100644 --- a/cli-qpid-jms/pom.xml +++ b/cli-qpid-jms/pom.xml @@ -35,7 +35,7 @@ jms com.redhat.mqe.jms.Main - 1.0.0 + 1.1.0 ${qpid.jms.client.version} 2.0.41.Final linux-x86_64-fedora From 973dd4c345e232d60e3458ae4564cfcadfb679b8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 17:59:22 +0200 Subject: [PATCH 020/435] Bump artemis.broker.version from 2.17.0 to 2.18.0 (#279) Bumps `artemis.broker.version` from 2.17.0 to 2.18.0. Updates `artemis-amqp-protocol` from 2.17.0 to 2.18.0 Updates `artemis-server` from 2.17.0 to 2.18.0 - [Release notes](https://github.com/apache/activemq-artemis/releases) - [Commits](https://github.com/apache/activemq-artemis/compare/2.17.0...2.18.0) --- updated-dependencies: - dependency-name: org.apache.activemq:artemis-amqp-protocol dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.apache.activemq:artemis-server dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 1d5bccdf..fb2329cb 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -45,7 +45,7 @@ 3.12.1 4.1.0 - 2.17.0 + 2.18.0 3.8.1 3.1.0 From ddf3c5f28d3f5c51edd28fe0ed6ba276eea96ed8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 18:06:27 +0200 Subject: [PATCH 021/435] Bump artemis.jms.client.version from 2.17.0 to 2.18.0 (#281) Bumps `artemis.jms.client.version` from 2.17.0 to 2.18.0. Updates `artemis-jms-client` from 2.17.0 to 2.18.0 - [Release notes](https://github.com/apache/activemq-artemis/releases) - [Commits](https://github.com/apache/activemq-artemis/compare/2.17.0...2.18.0) Updates `artemis-commons` from 2.17.0 to 2.18.0 - [Release notes](https://github.com/apache/activemq-artemis/releases) - [Commits](https://github.com/apache/activemq-artemis/compare/2.17.0...2.18.0) --- updated-dependencies: - dependency-name: org.apache.activemq:artemis-jms-client dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.apache.activemq:artemis-commons dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cli-artemis-jms/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-artemis-jms/pom.xml b/cli-artemis-jms/pom.xml index 143cb364..9c0d7db7 100644 --- a/cli-artemis-jms/pom.xml +++ b/cli-artemis-jms/pom.xml @@ -36,7 +36,7 @@ acc com.redhat.mqe.acc.Main false - 2.17.0 + 2.18.0 ${artemis.jms.client.version} From c342029917c91c0e126a51e8258a38ebd0a964ba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Aug 2021 16:30:52 +0200 Subject: [PATCH 022/435] Bump kotlin.version from 1.5.21 to 1.5.30 (#283) Bumps `kotlin.version` from 1.5.21 to 1.5.30. Updates `kotlin-stdlib` from 1.5.21 to 1.5.30 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.30/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.21...v1.5.30) Updates `kotlin-stdlib-jdk8` from 1.5.21 to 1.5.30 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.30/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.21...v1.5.30) Updates `kotlin-test-junit` from 1.5.21 to 1.5.30 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.30/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.21...v1.5.30) Updates `kotlin-maven-plugin` from 1.5.21 to 1.5.30 Updates `kotlin-reflect` from 1.5.21 to 1.5.30 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.30/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.21...v1.5.30) --- updated-dependencies: - dependency-name: org.jetbrains.kotlin:kotlin-stdlib dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-stdlib-jdk8 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-test-junit dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-reflect dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index fb2329cb..04a58570 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -38,7 +38,7 @@ 2.37 2.12.4 - 1.5.21 + 1.5.30 5.7.2 1.4.2 1.1.3 From 39e723635c2157656278516a9755956127a1a9a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Wed, 25 Aug 2021 17:24:17 +0200 Subject: [PATCH 023/435] Refactor Utils class so it can be used by cli-protonj2 (#275) * Refactor Utils class so it can be used by cli-protonj2 * Refactor Utils class so it can be used by cli-protonj2 --- .../src/main/java/com/redhat/mqe/Main.java | 61 +------- .../redhat/mqe/lib/ClientOptionManager.java | 8 +- .../com/redhat/mqe/lib/ConnectorClient.java | 4 +- .../main/java/com/redhat/mqe/lib/Content.java | 2 +- .../redhat/mqe/lib/JmsMessageFormatter.java | 16 +- .../java/com/redhat/mqe/lib/JmsUtils.java | 141 ++++++++++++++++++ .../com/redhat/mqe/lib/MessageBrowser.java | 2 +- .../com/redhat/mqe/lib/ReceiverClient.java | 4 +- .../main/java/com/redhat/mqe/lib/Utils.java | 104 +------------ .../mqe/lib/message/MapMessageProvider.java | 4 +- .../com/redhat/mqe/lib/MessageFormatter.java | 17 +++ .../redhat/mqe/lib/MessagingException.java | 8 +- 12 files changed, 181 insertions(+), 190 deletions(-) create mode 100644 jmslib/src/main/java/com/redhat/mqe/lib/JmsUtils.java rename jmslib/src/main/java/com/redhat/mqe/lib/JmsMessagingException.java => lib/src/main/java/com/redhat/mqe/lib/MessagingException.java (83%) diff --git a/cli-protonj2/src/main/java/com/redhat/mqe/Main.java b/cli-protonj2/src/main/java/com/redhat/mqe/Main.java index 230eaf5c..c01d5122 100644 --- a/cli-protonj2/src/main/java/com/redhat/mqe/Main.java +++ b/cli-protonj2/src/main/java/com/redhat/mqe/Main.java @@ -1,6 +1,7 @@ package com.redhat.mqe; -import com.redhat.mqe.lib.JmsMessagingException; +import com.redhat.mqe.lib.MessageFormatter; +import com.redhat.mqe.lib.Utils; import org.apache.qpid.protonj2.client.ClientOptions; import org.apache.qpid.protonj2.client.DistributionMode; import org.apache.qpid.protonj2.client.ReceiverOptions; @@ -25,7 +26,6 @@ import java.nio.file.Files; import java.nio.file.Paths; import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; @@ -85,7 +85,7 @@ void logMessage(String address, Message message, boolean msgContentHashed) throw sb.append("content"); sb.append("': "); sb.append("'"); // extra quotes to format - sb.append(hash(formatPython(message.body()))); + sb.append(MessageFormatter.hash(formatPython(message.body()))); sb.append("'"); sb.append(", "); } else { @@ -155,57 +155,6 @@ protected boolean stringToBool(String string) { boolean bool = string.equalsIgnoreCase("true") || string.equalsIgnoreCase("yes"); return bool; } - - private String hash(Object o) { - if (o == null) { - return null; // no point in hashing this value - } - MessageDigest md; - try { - md = MessageDigest.getInstance("SHA-1"); - } catch (NoSuchAlgorithmException e) { - throw new JmsMessagingException("Unable to hash message", e); - } - String content = o.toString(); - return new BigInteger(1, md.digest(content.getBytes())).toString(16); - } - - // can't call these as implemented in Utils, undefined JmsException; somehow fix this; break dep on jms api - - /** - * @return number of seconds (including milisecs) since EPOCH. - */ - public static double getTime() { - return System.currentTimeMillis(); - } - - - /** - * Sleeps until next timed for/while loop iteration. - * This method takes into account the length of the action it preceded. - * - * @param initialTimestamp initial timestamp (in get_time() double form) is passed from a connection started - * @param msgCount number of iterations - * @param duration total time of all iterations - * @param nextCountIndex next iteration index - */ - - public static void sleepUntilNextIteration(double initialTimestamp, int msgCount, double duration, int nextCountIndex) { - if ((duration > 0) && (msgCount > 0)) { - // initial overall duration approximation of whole loop (sender/receiver) - double cummulative_dur = (1.0 * nextCountIndex * duration) / msgCount; - while (true) { - if (getTime() - initialTimestamp - cummulative_dur > -0.05) - break; - try { -// LOG.trace("sleeping"); - Thread.sleep(100); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - } } @Command( @@ -607,7 +556,7 @@ public Integer call() throws Exception { // your business logic goes here... receiver = connection.openReceiver(address, receiverOptions); } - double initialTimestamp = getTime(); + double initialTimestamp = Utils.getTime(); for (int i = 0; i < count; i++) { // if (durationMode == DurationMode.sleepBeforeReceive) { @@ -628,7 +577,7 @@ public Integer call() throws Exception { // your business logic goes here... if (durationMode == DurationMode.afterReceive) { // LOG.trace("Sleeping after receive"); - sleepUntilNextIteration(initialTimestamp, count, duration, i + 1); + Utils.sleepUntilNextIteration(initialTimestamp, count, duration, i + 1); // todo possibly it is i, different loop here } if (processReplyTo && delivery.message().replyTo() != null) { diff --git a/jmslib/src/main/java/com/redhat/mqe/lib/ClientOptionManager.java b/jmslib/src/main/java/com/redhat/mqe/lib/ClientOptionManager.java index 20085cd2..06fab8b2 100644 --- a/jmslib/src/main/java/com/redhat/mqe/lib/ClientOptionManager.java +++ b/jmslib/src/main/java/com/redhat/mqe/lib/ClientOptionManager.java @@ -150,7 +150,7 @@ private void parseInputOptions(ClientOptions clientOptions, OptionParser parser, // Set parsed option for the client option try { setClientOptions(clientOptions.getOption(getOptionName(spec.options())), options, clientOptions); - } catch (JmsMessagingException me) { + } catch (MessagingException me) { LOG.error(me.toString(), me.getMessage()); me.printStackTrace(); System.exit(2); @@ -218,9 +218,9 @@ private static String getOptionName(List options) { * * @param clientOption Option of the client * @param options parsed option from command line - * @throws JmsMessagingException + * @throws MessagingException */ - private void setClientOptions(Option clientOption, OptionSet options, ClientOptions clientOptions) throws JmsMessagingException { + private void setClientOptions(Option clientOption, OptionSet options, ClientOptions clientOptions) throws MessagingException { // Check for multiple argument input values if (options.valuesOf(clientOption.getName()).size() == 1 && !ClientOptions.argsAcceptingMultipleValues.contains(clientOption.getName())) { @@ -262,7 +262,7 @@ private void setClientOptions(Option clientOption, OptionSet options, ClientOpti clientOption.setParsedValue(options.valuesOf(clientOption.getName())); } else { // if (option not in allowedMultiArgsList): - throw new JmsMessagingException("Option " + clientOption.getName() + throw new MessagingException("Option " + clientOption.getName() + " has wrong argument(s): " + options.valueOf(clientOption.getName())); } } diff --git a/jmslib/src/main/java/com/redhat/mqe/lib/ConnectorClient.java b/jmslib/src/main/java/com/redhat/mqe/lib/ConnectorClient.java index 75540f0a..c8188ffe 100644 --- a/jmslib/src/main/java/com/redhat/mqe/lib/ConnectorClient.java +++ b/jmslib/src/main/java/com/redhat/mqe/lib/ConnectorClient.java @@ -77,7 +77,7 @@ private void startConnections() { connectionsOpened++; } } catch (JMSException e) { - exceptions.add(new JmsMessagingException("Failed to start a connection.\n" + e.getMessage(), e.getCause())); + exceptions.add(new MessagingException("Failed to start a connection.\n" + e.getMessage(), e.getCause())); } } closeConnObjects(this, @@ -155,7 +155,7 @@ private void createConnectionObjects(String objCtrl) { LOG.trace("\tC={}\tE={}\tS={}\tR={}\tQ={}", conns, sesss, sends, reces, queues); } } catch (JMSException e) { - exceptions.add(new JmsMessagingException("Failed to create 'obj-ctrl.\n" + e.getMessage(), e.getCause())); + exceptions.add(new MessagingException("Failed to create 'obj-ctrl.\n" + e.getMessage(), e.getCause())); } } diff --git a/jmslib/src/main/java/com/redhat/mqe/lib/Content.java b/jmslib/src/main/java/com/redhat/mqe/lib/Content.java index cb1875c4..d7140dbe 100644 --- a/jmslib/src/main/java/com/redhat/mqe/lib/Content.java +++ b/jmslib/src/main/java/com/redhat/mqe/lib/Content.java @@ -87,7 +87,7 @@ public Content(String contentType, String parsedValue, boolean isMap) { } catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException e) { e.printStackTrace(); } - } catch (JmsMessagingException e) { + } catch (MessagingException e) { e.printStackTrace(); } } diff --git a/jmslib/src/main/java/com/redhat/mqe/lib/JmsMessageFormatter.java b/jmslib/src/main/java/com/redhat/mqe/lib/JmsMessageFormatter.java index 7a61a732..a7119657 100644 --- a/jmslib/src/main/java/com/redhat/mqe/lib/JmsMessageFormatter.java +++ b/jmslib/src/main/java/com/redhat/mqe/lib/JmsMessageFormatter.java @@ -96,7 +96,7 @@ public void addFormatJMS11(Message msg, Map result, boolean hash // Header result.put("durable", msg.getJMSDeliveryMode() == DeliveryMode.PERSISTENT); result.put("priority", msg.getJMSPriority()); - result.put("ttl", Utils.getTtl(msg)); + result.put("ttl", JmsUtils.getTtl(msg)); // Delivery Annotations @@ -123,20 +123,6 @@ public void addFormatJMS11(Message msg, Map result, boolean hash result.put("type", msg.getJMSType()); // not everywhere, amqp does not have it } - private String hash(Object o) { - if (o == null) { - return null; // no point in hashing this value - } - MessageDigest md; - try { - md = MessageDigest.getInstance("SHA-1"); - } catch (NoSuchAlgorithmException e) { - throw new JmsMessagingException("Unable to hash message", e); - } - String content = o.toString(); - return new BigInteger(1, md.digest(content.getBytes())).toString(16); - } - public void addFormatJMS20(Message msg, Map result) throws JMSException { // Delivery Annotations result.put("redelivered", msg.getJMSRedelivered()); diff --git a/jmslib/src/main/java/com/redhat/mqe/lib/JmsUtils.java b/jmslib/src/main/java/com/redhat/mqe/lib/JmsUtils.java new file mode 100644 index 00000000..78933eb9 --- /dev/null +++ b/jmslib/src/main/java/com/redhat/mqe/lib/JmsUtils.java @@ -0,0 +1,141 @@ +/* + * Copyright (c) 2021 Red Hat, Inc. + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 + * + * http://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 com.redhat.mqe.lib; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.jms.BytesMessage; +import javax.jms.JMSException; +import javax.jms.Message; +import javax.jms.StreamMessage; +import javax.jms.TextMessage; +import java.io.BufferedOutputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileOutputStream; +import java.io.FileWriter; +import java.io.IOException; +import java.io.ObjectOutputStream; + +public class JmsUtils { + private static final Logger LOG = LoggerFactory.getLogger(Utils.class); + + /** + * Calculate TTL of given message from message + * expiration time and message timestamp. + *

+ * Returns the time the message expires, which is the sum of the time-to-live value + * specified by the client and the GMT at the time of the send + * EXP_TIME = CLIENT_SEND+TTL (CLIENT_SEND??) + * CLIENT_SEND time is approximately getJMSTimestamp() (time value between send()/publish() and return) + * TODO - check for correctness + * + * @param message calculate TTL for this message + * @return positive long number if TTL was calculated. Long.MIN_VALUE if error. + */ + public static long getTtl(Message message) { + long ttl = 0; + try { + long expiration = message.getJMSExpiration(); + long timestamp = message.getJMSTimestamp(); + if (expiration != 0 && timestamp != 0) { + ttl = expiration - timestamp; + } + } catch (JMSException jmse) { + LOG.error("Error while calculating TTL value.\n" + jmse.getMessage()); + jmse.printStackTrace(); + System.exit(1); + } + return ttl; + } + + public static void streamMessageContentToFile(String filePath, Message message, int msgCounter) { + try { + File outputFile = getFilePath(filePath, msgCounter); + try (FileOutputStream fileOutputStream = new FileOutputStream(outputFile); + BufferedOutputStream bufferedOutput = new BufferedOutputStream(fileOutputStream)) { +// final String saveStream = "JMS_AMQ_SaveStream"; + final String saveStream = "JMS_AMQ_OutputStream"; + message.setObjectProperty(saveStream, bufferedOutput); + } + } catch (IOException e) { + LOG.error("Error while writing to file '" + filePath + "'."); + e.printStackTrace(); + } catch (JMSException e) { + e.printStackTrace(); + } + } + + static File getFilePath(String filePath, int msgCounter) throws IOException { + File file; + if (filePath == null || filePath.equals("")) { + file = File.createTempFile("recv_msg_", Long.toString(System.currentTimeMillis())); + } else { + file = new File(filePath + "_" + msgCounter); + } + return file; + } + + /** + * Write message body (text or binary) to provided file or default one in temp directory. + * + * @param filePath file to write data to + * @param message to be read and written to provided file + */ + public static void writeMessageContentToFile(String filePath, Message message, int msgCounter) { + byte[] readByteArray; + try { + File file; + file = getFilePath(filePath, msgCounter); + + LOG.debug("Write message content to file '" + file.getPath() + "'."); + if (message instanceof BytesMessage) { + LOG.debug("Writing BytesMessage to file"); + BytesMessage bm = (BytesMessage) message; + readByteArray = new byte[(int) bm.getBodyLength()]; + bm.reset(); // added to be able to read message content + bm.readBytes(readByteArray); + try (FileOutputStream fos = new FileOutputStream(file)) { + fos.write(readByteArray); + } + } else if (message instanceof StreamMessage) { + LOG.debug("Writing StreamMessage to file"); + StreamMessage sm = (StreamMessage) message; +// sm.reset(); TODO haven't tested this one + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + ObjectOutputStream oos = new ObjectOutputStream(baos); + oos.writeObject(sm.readObject()); + oos.close(); + } else if (message instanceof TextMessage) { + LOG.debug("Writing TextMessage to file"); + try (FileWriter fileWriter = new FileWriter(file)) { + TextMessage tm = (TextMessage) message; + fileWriter.write(tm.getText()); + } + } + } catch (JMSException e) { + e.printStackTrace(); + } catch (IOException e1) { + LOG.error("Error while writing to file '" + filePath + "'."); + e1.printStackTrace(); + } + } +} diff --git a/jmslib/src/main/java/com/redhat/mqe/lib/MessageBrowser.java b/jmslib/src/main/java/com/redhat/mqe/lib/MessageBrowser.java index e5390cd5..94e95708 100644 --- a/jmslib/src/main/java/com/redhat/mqe/lib/MessageBrowser.java +++ b/jmslib/src/main/java/com/redhat/mqe/lib/MessageBrowser.java @@ -60,7 +60,7 @@ public void startClient() { try { this.browseMessages(); } catch (Exception e) { - throw new JmsMessagingException("unable to browse messages", e); + throw new MessagingException("unable to browse messages", e); } } diff --git a/jmslib/src/main/java/com/redhat/mqe/lib/ReceiverClient.java b/jmslib/src/main/java/com/redhat/mqe/lib/ReceiverClient.java index 982a635b..f9a19cf4 100644 --- a/jmslib/src/main/java/com/redhat/mqe/lib/ReceiverClient.java +++ b/jmslib/src/main/java/com/redhat/mqe/lib/ReceiverClient.java @@ -232,9 +232,9 @@ void consumeMessage() { } if (file != null) { if (Boolean.valueOf(rcvrOpts.getOption(ClientOptions.MSG_CONTENT_STREAM).getValue())) { - Utils.streamMessageContentToFile(file, msg, i); + JmsUtils.streamMessageContentToFile(file, msg, i); } else { - Utils.writeMessageContentToFile(file, msg, i); + JmsUtils.writeMessageContentToFile(file, msg, i); } } i++; diff --git a/jmslib/src/main/java/com/redhat/mqe/lib/Utils.java b/jmslib/src/main/java/com/redhat/mqe/lib/Utils.java index 0a75a7e3..47b6cde2 100644 --- a/jmslib/src/main/java/com/redhat/mqe/lib/Utils.java +++ b/jmslib/src/main/java/com/redhat/mqe/lib/Utils.java @@ -24,8 +24,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.jms.*; -import java.io.*; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.Arrays; @@ -77,35 +75,6 @@ public static void sleep(long miliseconds) { } } - /** - * Calculate TTL of given message from message - * expiration time and message timestamp. - *

- * Returns the time the message expires, which is the sum of the time-to-live value - * specified by the client and the GMT at the time of the send - * EXP_TIME = CLIENT_SEND+TTL (CLIENT_SEND??) - * CLIENT_SEND time is approximately getJMSTimestamp() (time value between send()/publish() and return) - * TODO - check for correctness - * - * @param message calculate TTL for this message - * @return positive long number if TTL was calculated. Long.MIN_VALUE if error. - */ - public static long getTtl(Message message) { - long ttl = 0; - try { - long expiration = message.getJMSExpiration(); - long timestamp = message.getJMSTimestamp(); - if (expiration != 0 && timestamp != 0) { - ttl = expiration - timestamp; - } - } catch (JMSException jmse) { - LOG.error("Error while calculating TTL value.\n" + jmse.getMessage()); - jmse.printStackTrace(); - System.exit(1); - } - return ttl; - } - /** * @return number of seconds (including milisecs) since EPOCH. */ @@ -197,7 +166,7 @@ public static void setLogLevel(String logLevel) { * @return Class type of given value */ - public static Class getClassType(String preferredStringType, String value, boolean allowExplicitRetype) throws JmsMessagingException { + public static Class getClassType(String preferredStringType, String value, boolean allowExplicitRetype) throws MessagingException { LOG.trace("getClassType for " + value + ":" + preferredStringType); if (preferredStringType == null) { // set manually the contentType to (autotypecasting) @@ -326,75 +295,4 @@ public static Object getObjectValue(Class clazz, String object, boolean allow return myObj; } - public static void streamMessageContentToFile(String filePath, Message message, int msgCounter) { - try { - File outputFile = getFilePath(filePath, msgCounter); - try (FileOutputStream fileOutputStream = new FileOutputStream(outputFile); - BufferedOutputStream bufferedOutput = new BufferedOutputStream(fileOutputStream)) { -// final String saveStream = "JMS_AMQ_SaveStream"; - final String saveStream = "JMS_AMQ_OutputStream"; - message.setObjectProperty(saveStream, bufferedOutput); - } - } catch (IOException e) { - LOG.error("Error while writing to file '" + filePath + "'."); - e.printStackTrace(); - } catch (JMSException e) { - e.printStackTrace(); - } - } - - /** - * Write message body (text or binary) to provided file or default one in temp directory. - * - * @param filePath file to write data to - * @param message to be read and written to provided file - */ - public static void writeMessageContentToFile(String filePath, Message message, int msgCounter) { - byte[] readByteArray; - try { - File file; - file = getFilePath(filePath, msgCounter); - - LOG.debug("Write message content to file '" + file.getPath() + "'."); - if (message instanceof BytesMessage) { - LOG.debug("Writing BytesMessage to file"); - BytesMessage bm = (BytesMessage) message; - readByteArray = new byte[(int) bm.getBodyLength()]; - bm.reset(); // added to be able to read message content - bm.readBytes(readByteArray); - try (FileOutputStream fos = new FileOutputStream(file)) { - fos.write(readByteArray); - } - } else if (message instanceof StreamMessage) { - LOG.debug("Writing StreamMessage to file"); - StreamMessage sm = (StreamMessage) message; -// sm.reset(); TODO haven't tested this one - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - ObjectOutputStream oos = new ObjectOutputStream(baos); - oos.writeObject(sm.readObject()); - oos.close(); - } else if (message instanceof TextMessage) { - LOG.debug("Writing TextMessage to file"); - try (FileWriter fileWriter = new FileWriter(file)) { - TextMessage tm = (TextMessage) message; - fileWriter.write(tm.getText()); - } - } - } catch (JMSException e) { - e.printStackTrace(); - } catch (IOException e1) { - LOG.error("Error while writing to file '" + filePath + "'."); - e1.printStackTrace(); - } - } - - private static File getFilePath(String filePath, int msgCounter) throws IOException { - File file; - if (filePath == null || filePath.equals("")) { - file = File.createTempFile("recv_msg_", Long.toString(System.currentTimeMillis())); - } else { - file = new File(filePath + "_" + msgCounter); - } - return file; - } } diff --git a/jmslib/src/main/java/com/redhat/mqe/lib/message/MapMessageProvider.java b/jmslib/src/main/java/com/redhat/mqe/lib/message/MapMessageProvider.java index 194cd4a8..081b9ad8 100644 --- a/jmslib/src/main/java/com/redhat/mqe/lib/message/MapMessageProvider.java +++ b/jmslib/src/main/java/com/redhat/mqe/lib/message/MapMessageProvider.java @@ -21,7 +21,7 @@ import com.redhat.mqe.lib.ClientOptions; import com.redhat.mqe.lib.Content; -import com.redhat.mqe.lib.JmsMessagingException; +import com.redhat.mqe.lib.MessagingException; import com.redhat.mqe.lib.Utils; import javax.jms.JMSException; @@ -100,7 +100,7 @@ private void fillMapMessage(ClientOptions senderOptions, MapMessage mapMessage) mapMessage.setObject(c.getKey(), c.getValue()); } else { - throw new JmsMessagingException("Unknown data type in message Content. Do not know how to send it. Type=" + c.getType()); + throw new MessagingException("Unknown data type in message Content. Do not know how to send it. Type=" + c.getType()); } } } diff --git a/lib/src/main/java/com/redhat/mqe/lib/MessageFormatter.java b/lib/src/main/java/com/redhat/mqe/lib/MessageFormatter.java index e785db3f..9e816e6f 100644 --- a/lib/src/main/java/com/redhat/mqe/lib/MessageFormatter.java +++ b/lib/src/main/java/com/redhat/mqe/lib/MessageFormatter.java @@ -25,6 +25,9 @@ import org.slf4j.LoggerFactory; import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; import java.util.Hashtable; import java.util.List; import java.util.Map; @@ -238,4 +241,18 @@ public void printStatistics(Hashtable msg) { public void printConnectorStatistics(int connectionsOpened, int connectionsFailed, int connectionsTotal) { System.out.println(connectionsOpened + " " + connectionsFailed + " " + connectionsTotal); } + + public static String hash(Object o) { + if (o == null) { + return null; // no point in hashing this value + } + MessageDigest md; + try { + md = MessageDigest.getInstance("SHA-1"); + } catch (NoSuchAlgorithmException e) { + throw new MessagingException("Unable to hash message", e); + } + String content = o.toString(); + return new BigInteger(1, md.digest(content.getBytes())).toString(16); + } } diff --git a/jmslib/src/main/java/com/redhat/mqe/lib/JmsMessagingException.java b/lib/src/main/java/com/redhat/mqe/lib/MessagingException.java similarity index 83% rename from jmslib/src/main/java/com/redhat/mqe/lib/JmsMessagingException.java rename to lib/src/main/java/com/redhat/mqe/lib/MessagingException.java index 203fb40a..21b011f4 100644 --- a/jmslib/src/main/java/com/redhat/mqe/lib/JmsMessagingException.java +++ b/lib/src/main/java/com/redhat/mqe/lib/MessagingException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Red Hat, Inc. + * Copyright (c) 2021 Red Hat, Inc. * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -23,19 +23,19 @@ import java.io.ObjectOutputStream; @SuppressWarnings("serial") -public class JmsMessagingException extends RuntimeException { +public class MessagingException extends RuntimeException { private void writeObject(ObjectOutputStream out) throws IOException { } - public JmsMessagingException(String message) { + public MessagingException(String message) { super(message); } ; - public JmsMessagingException(String message, Throwable cause) { + public MessagingException(String message, Throwable cause) { super(message, cause); } From 98caa6d791ed60452b69735bdaaaea586e1d9414 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Aug 2021 18:58:53 +0200 Subject: [PATCH 024/435] Bump mockito-core from 3.12.1 to 3.12.3 (#284) Bumps [mockito-core](https://github.com/mockito/mockito) from 3.12.1 to 3.12.3. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v3.12.1...v3.12.3) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 04a58570..6e70f879 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -42,7 +42,7 @@ 5.7.2 1.4.2 1.1.3 - 3.12.1 + 3.12.3 4.1.0 2.18.0 From 1962fe53a5c94c8d31b44034d446a4936d8ae452 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 28 Aug 2021 00:17:02 +0200 Subject: [PATCH 025/435] Bump jackson-databind from 2.12.4 to 2.12.5 (#286) Bumps [jackson-databind](https://github.com/FasterXML/jackson) from 2.12.4 to 2.12.5. - [Release notes](https://github.com/FasterXML/jackson/releases) - [Commits](https://github.com/FasterXML/jackson/commits) --- updated-dependencies: - dependency-name: com.fasterxml.jackson.core:jackson-databind dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 6e70f879..5c470871 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -36,7 +36,7 @@ 1.7.32 5.0.4 2.37 - 2.12.4 + 2.12.5 1.5.30 5.7.2 From 03940c090de35f6643a60b6ceff0e25ee29db153 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 28 Aug 2021 11:04:29 +0200 Subject: [PATCH 026/435] Bump mockito-core from 3.12.3 to 3.12.4 (#285) Bumps [mockito-core](https://github.com/mockito/mockito) from 3.12.3 to 3.12.4. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v3.12.3...v3.12.4) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 5c470871..003e5e9b 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -42,7 +42,7 @@ 5.7.2 1.4.2 1.1.3 - 3.12.3 + 3.12.4 4.1.0 2.18.0 From f705bf59a94e65699e86a4c1b92c56b42d655f29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Wed, 1 Sep 2021 15:02:54 +0200 Subject: [PATCH 027/435] Plug cli-protonj2 into selftests (#287) --- cli-protonj2/pom.xml | 5 + .../com/redhat/mqe/CliProtonJ2Receiver.java | 251 +++++++++ .../com/redhat/mqe/CliProtonJ2Sender.java | 279 ++++++++++ .../main/java/com/redhat/mqe/ContentType.java | 2 +- .../src/main/java/com/redhat/mqe/LogMsgs.java | 24 + .../src/main/java/com/redhat/mqe/Main.java | 489 +----------------- .../java/com/redhat/mqe/PropertyType.java | 35 ++ .../redhat/mqe/ProtonJ2MessageFormatter.java | 97 ++++ .../test/java/com/redhat/mqe/MainTest.java | 6 +- .../com/redhat/mqe/MessageLoggingTest.java | 119 +++++ cli-protonj2/src/test/kotlin/MainTest.kt | 235 +++++++++ .../src/test/kotlin/ClientFormatterSpy.kt | 51 +- interop-tests/src/test/kotlin/InteropTest.kt | 2 +- .../test/kotlin/ProtonJ2ClientFormatterSpy.kt | 39 ++ .../main/java/com/redhat/mqe/lib/Content.java | 9 +- .../com/redhat/mqe/lib/MessageFormatter.java | 14 +- .../main/java/com/redhat/mqe/lib/Utils.java | 0 17 files changed, 1154 insertions(+), 503 deletions(-) create mode 100644 cli-protonj2/src/main/java/com/redhat/mqe/CliProtonJ2Receiver.java create mode 100644 cli-protonj2/src/main/java/com/redhat/mqe/CliProtonJ2Sender.java create mode 100644 cli-protonj2/src/main/java/com/redhat/mqe/LogMsgs.java create mode 100644 cli-protonj2/src/main/java/com/redhat/mqe/PropertyType.java create mode 100644 cli-protonj2/src/main/java/com/redhat/mqe/ProtonJ2MessageFormatter.java create mode 100644 cli-protonj2/src/test/java/com/redhat/mqe/MessageLoggingTest.java create mode 100644 cli-protonj2/src/test/kotlin/MainTest.kt create mode 100644 interop-tests/src/test/kotlin/ProtonJ2ClientFormatterSpy.kt rename {jmslib => lib}/src/main/java/com/redhat/mqe/lib/Content.java (93%) rename {jmslib => lib}/src/main/java/com/redhat/mqe/lib/Utils.java (100%) diff --git a/cli-protonj2/pom.xml b/cli-protonj2/pom.xml index 32202c59..ae038343 100644 --- a/cli-protonj2/pom.xml +++ b/cli-protonj2/pom.xml @@ -90,6 +90,11 @@ 4.6.1 + + com.redhat.cli-java + cli + test + com.redhat.cli-java tests diff --git a/cli-protonj2/src/main/java/com/redhat/mqe/CliProtonJ2Receiver.java b/cli-protonj2/src/main/java/com/redhat/mqe/CliProtonJ2Receiver.java new file mode 100644 index 00000000..ab78e939 --- /dev/null +++ b/cli-protonj2/src/main/java/com/redhat/mqe/CliProtonJ2Receiver.java @@ -0,0 +1,251 @@ +/* + * Copyright (c) 2021 Red Hat, Inc. + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 + * + * http://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 com.redhat.mqe; + +import com.redhat.mqe.lib.Utils; +import org.apache.qpid.protonj2.client.Client; +import org.apache.qpid.protonj2.client.ClientOptions; +import org.apache.qpid.protonj2.client.Connection; +import org.apache.qpid.protonj2.client.ConnectionOptions; +import org.apache.qpid.protonj2.client.Delivery; +import org.apache.qpid.protonj2.client.DistributionMode; +import org.apache.qpid.protonj2.client.Message; +import org.apache.qpid.protonj2.client.Receiver; +import org.apache.qpid.protonj2.client.ReceiverOptions; +import org.apache.qpid.protonj2.client.Sender; +import picocli.CommandLine; + +import java.net.URI; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.concurrent.Callable; +import java.util.concurrent.TimeUnit; + +import static com.redhat.mqe.lib.ClientOptionManager.QUEUE_PREFIX; +import static com.redhat.mqe.lib.ClientOptionManager.TOPIC_PREFIX; + +@CommandLine.Command( + name = "receiver", + mixinStandardHelpOptions = true, + version = "1.0.0", + description = "Opens AMQP connections" +) +public class CliProtonJ2Receiver extends CliProtonJ2SenderReceiver implements Callable { + + private final ProtonJ2MessageFormatter messageFormatter; + + @CommandLine.Option(names = {"--log-msgs"}, description = "MD5, SHA-1, SHA-256, ...") + private LogMsgs logMsgs = LogMsgs.dict; + + @CommandLine.Option(names = {"--msg-content-hashed"}) + private String msgContentHashedString = "false"; + + @CommandLine.Option(names = {"-b", "--broker"}, description = "MD5, SHA-1, SHA-256, ...") + private String broker = "MD5"; + + @CommandLine.Option(names = {"--conn-username"}, description = "MD5, SHA-1, SHA-256, ...") + private String connUsername = "MD5"; + + @CommandLine.Option(names = {"--conn-password"}, description = "MD5, SHA-1, SHA-256, ...") + private String connPassword = "MD5"; + + @CommandLine.Option(names = {"--conn-clientid"}) + private String connClientId; + + @CommandLine.Option(names = {"--durable-subscriber"}) + private String durableSubscriberString = "false"; + + @CommandLine.Option(names = {"--durable-subscriber-name"}) + private String durableSubscriberName; + + // TODO not implemented + @CommandLine.Option(names = {"--subscriber-unsubscribe"}) + private String subscriberUnsubscribeString; + + @CommandLine.Option(names = {"-a", "--address"}, description = "MD5, SHA-1, SHA-256, ...") + private String address = "MD5"; + + @CommandLine.Option(names = {"--recv-browse"}, description = "browse queued messages instead of receiving them") + private String recvBrowseString = "false"; + + @CommandLine.Option(names = {"--count"}, description = "MD5, SHA-1, SHA-256, ...") + private int count = 1; + + @CommandLine.Option(names = {"--timeout"}, description = "MD5, SHA-1, SHA-256, ...") + private int timeout; + + @CommandLine.Option(names = {"--conn-auth-mechanisms"}, description = "MD5, SHA-1, SHA-256, ...") + // todo, want to accept comma-separated lists; there is https://picocli.info/#_split_regex + private List connAuthMechanisms = new ArrayList<>(); + + @CommandLine.Option(names = {"--process-reply-to"}) + private boolean processReplyTo = false; + + @CommandLine.Option(names = {"--duration"}) // todo + private Integer duration; + + @CommandLine.Option(names = {"--duration-mode"}) // todo + private DurationMode durationMode; + + @CommandLine.Option(names = {"--ssn-ack-mode"}) + private SsnAckMode ssnAckMode; + + public CliProtonJ2Receiver() { + this.messageFormatter = new ProtonJ2MessageFormatter(); + } + + public CliProtonJ2Receiver(ProtonJ2MessageFormatter messageFormatter) { + this.messageFormatter = messageFormatter; + } + + @Override + public Integer call() throws Exception { // your business logic goes here... + String prefix = ""; + if (!broker.startsWith("amqp://") && !broker.startsWith("amqps://")) { + prefix = "amqp://"; + } + final URI url = new URI(prefix + broker); + final String serverHost = url.getHost(); + int serverPort = url.getPort(); + serverPort = (serverPort == -1) ? 5672 : serverPort; + + String destinationCapability = "queue"; + if (address.startsWith(TOPIC_PREFIX)) { + address = address.substring((TOPIC_PREFIX.length())); + destinationCapability = "topic"; + } + if (address.startsWith(QUEUE_PREFIX)) { + address = address.substring((QUEUE_PREFIX.length())); + } + + ClientOptions clientOptions = new ClientOptions(); + // TODO api usability I had to hunt for this a bit; the idea is to have durable subscription: need specify connection id and subscriber name + if (connClientId != null) { + clientOptions.id(connClientId); + } + + // TODO api usability; If I use the w/ clientOptions variant of Client.create, then .id defaults to null, and I get exception; + // ok, that just cannot be true ^^^; but it looks to be true; what!?! + // aha, right; constructor does not check, factory method does check for null + // proposed solution: allow null there, and let it mean autoassign; or tell us method to generate ID ourselves if we don't care + Client client; + if (clientOptions.id() != null) { + client = Client.create(clientOptions); + } else { + client = Client.create(); + } + + final ConnectionOptions options = new ConnectionOptions(); + options.user(connUsername); + options.password(connPassword); + for (AuthMechanism mech : connAuthMechanisms) { + options.saslOptions().addAllowedMechanism(mech.name()); + } + + /* + TODO API usability, hard to ask for queue when dealing with broker that likes to autocreate topics + */ + ReceiverOptions receiverOptions = new ReceiverOptions(); + // is it target or source? target. + receiverOptions.sourceOptions().capabilities(destinationCapability); + + // todo: another usability, little hard to figure out this is analogue of jms to browse queues + if (stringToBool(recvBrowseString)) { + receiverOptions.sourceOptions().distributionMode(DistributionMode.COPY); + } + + // TODO: API question: what is difference between autoSettle and autoAccept? why I want one but not the other? + if (ssnAckMode != null) { + if (ssnAckMode == SsnAckMode.client) { + receiverOptions.autoAccept(false); + receiverOptions.autoSettle(false); + } + } + + try (Connection connection = client.connect(serverHost, serverPort, options)) { + Receiver receiver; + if (stringToBool(durableSubscriberString)) { + receiver = connection.openDurableReceiver(address, durableSubscriberName, receiverOptions); + } else { + receiver = connection.openReceiver(address, receiverOptions); + } + + double initialTimestamp = Utils.getTime(); + for (int i = 0; i < count; i++) { + +// if (durationMode == DurationMode.sleepBeforeReceive) { +// LOG.trace("Sleeping before receive"); +// Utils.sleepUntilNextIteration(initialTimestamp, msgCount, duration, i + 1); +// } + + final Delivery delivery; + if (timeout == 0) { + delivery = receiver.receive(); // todo: can default it to -1 + } else { + delivery = receiver.receive(timeout, TimeUnit.SECONDS); + } + + if (delivery == null) { + break; + } + + if (durationMode == DurationMode.afterReceive) { +// LOG.trace("Sleeping after receive"); + Utils.sleepUntilNextIteration(initialTimestamp, count, duration, i + 1); // todo possibly it is i, different loop here + } + + if (processReplyTo && delivery.message().replyTo() != null) { + String replyTo = delivery.message().replyTo(); + Message message = delivery.message(); + message.replyTo(null); + try (Sender sender = connection.openSender(replyTo)) { + sender.send(message); + } + } + + int messageFormat = delivery.messageFormat(); + Message message = delivery.message(); + + // todo, is this what we mean? + if (ssnAckMode != null && ssnAckMode == SsnAckMode.client) { + delivery.accept(); + } + + Map messageDict = messageFormatter.formatMessage(address, message, stringToBool(msgContentHashedString)); + switch (logMsgs) { + case dict: + messageFormatter.printMessageAsPython(messageDict); + break; + case interop: + messageFormatter.printMessageAsJson(messageDict); + break; + } + } + + // TODO API usability, how do I do durable subscription with detach, resume, etc; no mention of unsubscribe in the client anywhere + receiver.close(); // TODO want to do autoclosable, need helper func, that's all +// receiver.detach(); + } + + return 0; + } + +} diff --git a/cli-protonj2/src/main/java/com/redhat/mqe/CliProtonJ2Sender.java b/cli-protonj2/src/main/java/com/redhat/mqe/CliProtonJ2Sender.java new file mode 100644 index 00000000..6c160f61 --- /dev/null +++ b/cli-protonj2/src/main/java/com/redhat/mqe/CliProtonJ2Sender.java @@ -0,0 +1,279 @@ +/* + * Copyright (c) 2021 Red Hat, Inc. + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 + * + * http://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 com.redhat.mqe; + +import com.redhat.mqe.lib.Content; +import com.redhat.mqe.lib.MessageFormatter; +import org.apache.qpid.protonj2.client.Client; +import org.apache.qpid.protonj2.client.Connection; +import org.apache.qpid.protonj2.client.ConnectionOptions; +import org.apache.qpid.protonj2.client.Message; +import org.apache.qpid.protonj2.client.Sender; +import org.apache.qpid.protonj2.client.SenderOptions; +import picocli.CommandLine; + +import java.net.URI; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.Callable; + +import static com.redhat.mqe.lib.ClientOptionManager.QUEUE_PREFIX; +import static com.redhat.mqe.lib.ClientOptionManager.TOPIC_PREFIX; + +@CommandLine.Command( + name = "sender", + mixinStandardHelpOptions = true, + version = "1.0.0", + description = "Opens AMQP connections" +) +public class CliProtonJ2Sender extends CliProtonJ2SenderReceiver implements Callable { + + private final ProtonJ2MessageFormatter messageFormatter; + + @CommandLine.Option(names = {"--log-msgs"}, description = "message reporting style") + private LogMsgs logMsgs = LogMsgs.dict; + + @CommandLine.Option(names = {"--msg-content-hashed"}) + private String msgContentHashedString = "false"; + + @CommandLine.Option(names = {"-b", "--broker"}, description = "MD5, SHA-1, SHA-256, ...") + private String broker = "MD5"; + + @CommandLine.Option(names = {"--conn-username"}, description = "MD5, SHA-1, SHA-256, ...") + private String connUsername = "MD5"; + + @CommandLine.Option(names = {"--conn-password"}, description = "MD5, SHA-1, SHA-256, ...") + private String connPassword = "MD5"; + + @CommandLine.Option(names = {"-a", "--address"}, description = "MD5, SHA-1, SHA-256, ...") + private String address = "MD5"; + + @CommandLine.Option(names = {"--count"}, description = "MD5, SHA-1, SHA-256, ...") + private int count = 1; + + @CommandLine.Option(names = {"--timeout"}, description = "MD5, SHA-1, SHA-256, ...") + private int timeout; + + @CommandLine.Option(names = {"--duration"}) + private Float duration; // TODO do something with it + + @CommandLine.Option(names = {"--conn-auth-mechanisms"}, description = "MD5, SHA-1, SHA-256, ...") + // todo, want to accept comma-separated lists; there is https://picocli.info/#_split_regex + private List connAuthMechanisms = new ArrayList<>(); + + @CommandLine.Option(names = {"--msg-property"}) // picocli Map options works for this, sounds like + private List msgProperties = new ArrayList<>(); + + @CommandLine.Option(names = {"--msg-content"}) + private String msgContent; + + @CommandLine.Option(names = {"--msg-content-from-file"}) + private String msgContentFromFile; + + @CommandLine.Option(names = {"--content-type"}) + private ContentType contentType = ContentType.STRING; + + @CommandLine.Option(names = {"--property-type"}) + private PropertyType propertyType = PropertyType.String; + + @CommandLine.Option(names = {"--msg-durable"}) + private String msgDurableString = "false"; + + @CommandLine.Option(names = {"--msg-ttl"}) + private Long msgTtl; + + @CommandLine.Option(names = {"--msg-content-list-item"}) + private List msgContentListItem; + + @CommandLine.Option(names = {"--msg-content-map-item"}) + private List msgContentMapItems; + + @CommandLine.Option(names = {"--msg-content-binary"}) + private String msgContentBinaryString = "false"; + + @CommandLine.Option(names = {"--msg-correlation-id"}) + private String msgCorrelationId; + + @CommandLine.Option(names = {"--msg-group-id"}) + private String msgGroupId; + + @CommandLine.Option(names = {"--msg-id"}) + private String msgId; // todo, not just string is an option + + @CommandLine.Option(names = {"--msg-reply-to"}) + private String msgReplyTo; + + @CommandLine.Option(names = {"--msg-subject"}) + private String msgSubject; + + @CommandLine.Option(names = {"--msg-user-id"}) + private String msgUserId; + + @CommandLine.Option(names = {"--msg-priority"}) + private Byte msgPriority; + + // jms.populateJMSXUserID opt in qpid-jms + // TODO: does not seem to have equivalent; what is the threat model for "prevent spoofing" in JMS docs? + @CommandLine.Option(names = {"--conn-populate-user-id"}) + private String connPopulateUserIdString = "false"; + + @CommandLine.Option(names = {"--msg-group-seq"}) + private Integer msgGroupSeq; + + @CommandLine.Option(names = {"--msg-reply-to-group-id"}) + private String msgReplyToGroupId; + + @CommandLine.Option(names = {"--ssn-ack-mode"}) + private SsnAckMode ssnAckMode; + + public CliProtonJ2Sender() { + this.messageFormatter = new ProtonJ2MessageFormatter(); + } + + public CliProtonJ2Sender(ProtonJ2MessageFormatter messageFormatter) { + this.messageFormatter = messageFormatter; + } + + @Override + public Integer call() throws Exception { // your business logic goes here... + + String prefix = ""; + if (!broker.startsWith("amqp://") && !broker.startsWith("amqps://")) { + prefix = "amqp://"; + } + final URI url = new URI(prefix + broker); + final String serverHost = url.getHost(); + int serverPort = url.getPort(); + serverPort = (serverPort == -1) ? 5672 : serverPort; + + String destinationCapability = "queue"; + if (address.startsWith(TOPIC_PREFIX)) { + address = address.substring((TOPIC_PREFIX.length())); + destinationCapability = "topic"; + } + if (address.startsWith(QUEUE_PREFIX)) { + address = address.substring((QUEUE_PREFIX.length())); + } + + final Client client = Client.create(); + + final ConnectionOptions options = new ConnectionOptions(); + options.user(connUsername); + options.password(connPassword); + for (AuthMechanism mech : connAuthMechanisms) { + options.saslOptions().addAllowedMechanism(mech.name()); + } + + /* + TODO API usablility, hard to ask for queue when dealing with broker that likes to autocreate topics + */ + SenderOptions senderOptions = new SenderOptions(); + // is it target or source? target. + senderOptions.targetOptions().capabilities(destinationCapability); + try (Connection connection = client.connect(serverHost, serverPort, options); + Sender sender = connection.openSender(address, senderOptions)) { + + for (int i = 0; i < count; i++) { + Message message; + if (msgContentListItem != null && !msgContentListItem.isEmpty()) { // TODO check only one of these is specified + List list = new ArrayList<>(); + for (String item : msgContentListItem) { + Content content = new Content(contentType.toString(), item, false); // TODO do this in args parsing? + list.add(content.getValue()); + } + message = Message.create((Object) list); + } else if (msgContentMapItems != null) { + Map map = new HashMap<>(); + for (String item : msgContentMapItems) { + Content content = new Content(contentType.toString(), item, true); // TODO do this in args parsing? + map.put(content.getKey(), content.getValue()); + } + message = Message.create((Object) map); + } else if (msgContentFromFile != null) { + if (stringToBool(msgContentBinaryString)) { + message = Message.create(Files.readAllBytes(Paths.get(msgContentFromFile))); // todo maybe param type as Path? check exists + } else { + message = Message.create(Files.readString(Paths.get(msgContentFromFile))); // todo maybe param type as Path? check exists + } + } else { + message = Message.create(msgContent); + } + if (msgProperties != null) { + for (String item : msgProperties) { + Content content = new Content(propertyType.toString(), item, true); // TODO do this in args parsing? + message.property(content.getKey(), content.getValue()); + } + } + if (msgId != null) { + message.messageId(msgId); + } + if (msgCorrelationId != null) { + message.correlationId(msgCorrelationId); + } + if (msgTtl != null) { + message.timeToLive(msgTtl); + } + if (stringToBool(msgDurableString)) { + message.durable(true); + } + if (msgGroupId != null) { + message.groupId(msgGroupId); + } + if (msgGroupSeq != null) { + message.groupSequence(msgGroupSeq); + } + if (msgReplyTo != null) { + message.replyTo(msgReplyTo); + } + if (msgReplyToGroupId != null) { + message.replyToGroupId(msgReplyToGroupId); + } + if (contentType != null) { + message.contentType(contentType.toString()); // TODO: maybe should do more with it? don't bother with enum? + } + if (stringToBool(connPopulateUserIdString)) { + message.userId(msgUserId.getBytes()); + } + if (msgSubject != null) { + message.subject(msgSubject); + } + if (msgPriority != null) { + message.priority(msgPriority); + } + sender.send(message); // TODO what's timeout for in a sender? + + Map messageDict = messageFormatter.formatMessage(address, (Message) message, stringToBool(msgContentHashedString)); + switch (logMsgs) { + case dict: + messageFormatter.printMessageAsPython(messageDict); + break; + case interop: + messageFormatter.printMessageAsJson(messageDict); + break; + } + } + } + return 0; + } +} diff --git a/cli-protonj2/src/main/java/com/redhat/mqe/ContentType.java b/cli-protonj2/src/main/java/com/redhat/mqe/ContentType.java index f2105971..e5d5dd35 100644 --- a/cli-protonj2/src/main/java/com/redhat/mqe/ContentType.java +++ b/cli-protonj2/src/main/java/com/redhat/mqe/ContentType.java @@ -20,7 +20,7 @@ package com.redhat.mqe; public enum ContentType { - INT("int"); + INT("int"), STRING("string"); private final String value; diff --git a/cli-protonj2/src/main/java/com/redhat/mqe/LogMsgs.java b/cli-protonj2/src/main/java/com/redhat/mqe/LogMsgs.java new file mode 100644 index 00000000..47f5a0bd --- /dev/null +++ b/cli-protonj2/src/main/java/com/redhat/mqe/LogMsgs.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2021 Red Hat, Inc. + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 + * + * http://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 com.redhat.mqe; + +public enum LogMsgs { + dict, interop +} diff --git a/cli-protonj2/src/main/java/com/redhat/mqe/Main.java b/cli-protonj2/src/main/java/com/redhat/mqe/Main.java index c01d5122..25a9def8 100644 --- a/cli-protonj2/src/main/java/com/redhat/mqe/Main.java +++ b/cli-protonj2/src/main/java/com/redhat/mqe/Main.java @@ -1,5 +1,6 @@ package com.redhat.mqe; +import com.redhat.mqe.lib.Content; import com.redhat.mqe.lib.MessageFormatter; import com.redhat.mqe.lib.Utils; import org.apache.qpid.protonj2.client.ClientOptions; @@ -64,92 +65,7 @@ public static void main(String... args) { } class CliProtonJ2SenderReceiver { - void logMessage(String address, Message message, boolean msgContentHashed) throws ClientException { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - - addKeyValue(sb, "address", address); - addKeyValue(sb, "group-id", message.groupId()); - addKeyValue(sb, "subject", message.subject()); - addKeyValue(sb, "user-id", message.userId()); - addKeyValue(sb, "correlation-id", message.correlationId()); - addKeyValue(sb, "content-encoding", message.contentEncoding()); - addKeyValue(sb, "priority", message.priority()); - addKeyValue(sb, "type", "string"); // ??? - addKeyValue(sb, "ttl", message.timeToLive()); - addKeyValue(sb, "absolute-expiry-time", message.absoluteExpiryTime()); - if (msgContentHashed) { - // this is inlined addKeyValue, TODO do it nicer - sb.append("'"); - sb.append("content"); - sb.append("': "); - sb.append("'"); // extra quotes to format - sb.append(MessageFormatter.hash(formatPython(message.body()))); - sb.append("'"); - sb.append(", "); - } else { - addKeyValue(sb, "content", message.body()); - } - addKeyValue(sb, "redelivered", message.deliveryCount() > 1); - addKeyValue(sb, "reply-to-group-id", message.replyToGroupId()); - addKeyValue(sb, "durable", message.durable()); - addKeyValue(sb, "group-sequence", message.groupSequence()); - addKeyValue(sb, "creation-time", message.creationTime()); - addKeyValue(sb, "content-type", message.contentType()); - addKeyValue(sb, "id", message.messageId()); - addKeyValue(sb, "reply-to", message.replyTo()); - - // getPropertyNames? from JMS missing? - StringBuilder sbb = new StringBuilder(); - sbb.append('{'); -// AtomicBoolean first = new AtomicBoolean(true); - message.forEachProperty((s, o) -> { -// if (!first.get()) { -// sbb.append(", "); -// first.set(false); -// } - addKeyValue(sbb, (String) s, o); // this wanted to cast to string when I removed message generic type; what??? TODO - }); - if (message.hasProperties()) { - sbb.delete(sbb.length() - 2, sbb.length()); // remove last ", " - } - sbb.append('}'); - addKeyValue(sb, "properties", sbb); // ??? - - sb.delete(sb.length() - 2, sb.length()); // remove last ", " - - sb.append("}"); - - System.out.println(sb); - } - - void addKeyValue(StringBuilder sb, String key, Object value) { - sb.append("'"); - sb.append(key); - sb.append("': "); - sb.append(formatPython(value)); - sb.append(", "); - } - - String formatPython(Object parameter) { - if (parameter == null) { - return "None"; - } - if (parameter instanceof String) { - return "'" + parameter + "'"; - } - if (parameter instanceof Boolean) { - return ((boolean)parameter) ? "True" : "False"; - } - if (parameter instanceof StringBuilder) { - return parameter.toString(); - } - if (parameter instanceof List) { - return "[" + ((List) parameter).stream().map(this::formatPython).collect(Collectors.joining(", ")) + "]"; - } - return "'" + parameter + "'"; - } protected boolean stringToBool(String string) { boolean bool = string.equalsIgnoreCase("true") || string.equalsIgnoreCase("yes"); @@ -208,404 +124,7 @@ enum AuthMechanism { PLAIN, } -@Command( - name = "sender", - mixinStandardHelpOptions = true, - version = "1.0.0", - description = "Opens AMQP connections" -) -class CliProtonJ2Sender extends CliProtonJ2SenderReceiver implements Callable { - - @Option(names = {"--log-msgs"}, description = "MD5, SHA-1, SHA-256, ...") - private String logMsgs = "MD5"; - - @Option(names = {"--msg-content-hashed"}) - private String msgContentHashedString = "false"; - - @Option(names = {"--broker"}, description = "MD5, SHA-1, SHA-256, ...") - private String broker = "MD5"; - - @Option(names = {"--conn-username"}, description = "MD5, SHA-1, SHA-256, ...") - private String connUsername = "MD5"; - - @Option(names = {"--conn-password"}, description = "MD5, SHA-1, SHA-256, ...") - private String connPassword = "MD5"; - - @Option(names = {"--address"}, description = "MD5, SHA-1, SHA-256, ...") - private String address = "MD5"; - - @Option(names = {"--count"}, description = "MD5, SHA-1, SHA-256, ...") - private int count = 1; - - @Option(names = {"--timeout"}, description = "MD5, SHA-1, SHA-256, ...") - private int timeout; - - @Option(names = {"--duration"}) - private int duration; // TODO do something with it - - @Option(names = {"--conn-auth-mechanisms"}, description = "MD5, SHA-1, SHA-256, ...") - // todo, want to accept comma-separated lists; there is https://picocli.info/#_split_regex - private List connAuthMechanisms = new ArrayList<>(); - - @Option(names = {"--msg-property"}) // picocli Map options works for this, sounds like - private List msgProperties = new ArrayList<>(); - - @Option(names = {"--msg-content"}) - private String msgContent; - - @Option(names = {"--msg-content-from-file"}) - private String msgContentFromFile; - - @Option(names = {"--content-type"}) - private ContentType contentType; - - @Option(names = {"--msg-durable"}) - private String msgDurableString = "false"; - - @Option(names = {"--msg-ttl"}) - private Long msgTtl; - - @Option(names = {"--msg-content-list-item"}) - private List msgContentListItem; - - @Option(names = {"--msg-content-map-item"}) - private List msgContentMapItems; - - @Option(names = {"--msg-correlation-id"}) - private String msgCorrelationId; - - @Option(names = {"--msg-group-id"}) - private String msgGroupId; - - @Option(names = {"--msg-id"}) - private String msgId; // todo, not just string is an option - - @Option(names = {"--msg-reply-to"}) - private String msgReplyTo; - - @Option(names = {"--msg-subject"}) - private String msgSubject; - - @Option(names = {"--msg-user-id"}) - private String msgUserId; - - @Option(names = {"--msg-priority"}) - private Byte msgPriority; - - // jms.populateJMSXUserID opt in qpid-jms - // TODO: does not seem to have equivalent; what is the threat model for "prevent spoofing" in JMS docs? - @Option(names = {"--conn-populate-user-id"}) - private String connPopulateUserIdString = "false"; - - @Option(names = {"--msg-group-seq"}) - private Integer msgGroupSeq; - - @Option(names = {"--msg-reply-to-group-id"}) - private String msgReplyToGroupId; - - @Option(names = {"--ssn-ack-mode"}) - private SsnAckMode ssnAckMode; - - @Override - public Integer call() throws Exception { // your business logic goes here... - - String prefix = ""; - if (!broker.startsWith("amqp://") || !broker.startsWith("amqps://")) { - prefix = "amqp://"; - } - final URI url = new URI(prefix + broker); - final String serverHost = url.getHost(); - int serverPort = url.getPort(); - serverPort = (serverPort == -1) ? 5672 : serverPort; - - String destinationCapability = "queue"; - if (address.startsWith(TOPIC_PREFIX)) { - address = address.substring((TOPIC_PREFIX.length())); - destinationCapability = "topic"; - } - if (address.startsWith(QUEUE_PREFIX)) { - address = address.substring((QUEUE_PREFIX.length())); - } - - final Client client = Client.create(); - - final ConnectionOptions options = new ConnectionOptions(); - options.user(connUsername); - options.password(connPassword); - for (AuthMechanism mech : connAuthMechanisms) { - options.saslOptions().addAllowedMechanism(mech.name()); - } - - /* - TODO API usablility, hard to ask for queue when dealing with broker that likes to autocreate topics - */ - SenderOptions senderOptions = new SenderOptions(); - // is it target or source? target. - senderOptions.targetOptions().capabilities(destinationCapability); - try (Connection connection = client.connect(serverHost, serverPort, options); - Sender sender = connection.openSender(address, senderOptions)) { +// todo list of features in general; supports kerberos, io-uring, epoll, websockets, +// does it support opening listening sockets? listening websocket? +// does support all JMS 2.0 capabilities? (in some way, assuming broker cooperates?) - for (int i = 0; i < count; i++) { - Message message; - if (msgContentListItem != null && !msgContentListItem.isEmpty()) { // TODO check only one of these is specified - // TODO have to cast strings to objects of correct types - message = Message.create(msgContentListItem); - } else if (msgContentMapItems != null) { - Map map = new HashMap<>(); - for (String item : msgContentMapItems) { - String[] fields = item.split("[=~]", 2); - if (fields.length != 2) { - throw new RuntimeException("Wrong format " + Arrays.toString(fields)); // TODO do this in args parsing? - } - map.put(fields[0], fields[1]); // todo retype value - } - message = Message.create(map); - } else if (msgContentFromFile != null) { - message = Message.create(Files.readString(Paths.get(msgContentFromFile))); // todo maybe param type as Path? check exists - } else { - message = Message.create(msgContent); - } - for (String property : msgProperties) { - String[] fields = property.split("[=~]", 2); // todo do something with ~ - if (fields.length != 2) { - throw new RuntimeException("Wrong format " + Arrays.toString(fields)); // TODO do this in args parsing - } - String key = fields[0]; - String value = fields[1]; // more types - message.property(key, value); - } - if (msgId != null) { - message.messageId(msgId); - } - if (msgCorrelationId != null) { - message.correlationId(msgCorrelationId); - } - if (msgTtl != null) { - message.timeToLive(msgTtl); - } - if (stringToBool(msgDurableString)) { - message.durable(true); - } - if (msgGroupId != null) { - message.groupId(msgGroupId); - } - if (msgGroupSeq != null) { - message.groupSequence(msgGroupSeq); - } - if (msgReplyTo != null) { - message.replyTo(msgReplyTo); - } - if (msgReplyToGroupId != null) { - message.replyToGroupId(msgReplyToGroupId); - } - if (contentType != null) { - message.contentType(contentType.toString()); // TODO: maybe should do more with it? don't bother with enum? - } - // todo, not sure what to do here; should I use authenticated userid instead? - if (stringToBool(connPopulateUserIdString)) { - message.userId(msgUserId.getBytes()); - } - if (msgSubject != null) { - message.subject(msgSubject); - } - if (msgPriority != null) { - message.priority(msgPriority); - } - sender.send(message); // TODO what's timeout for in a sender? - logMessage(address, message, stringToBool(msgContentHashedString)); - } - } - - return 0; - } -} - -@Command( - name = "receiver", - mixinStandardHelpOptions = true, - version = "1.0.0", - description = "Opens AMQP connections" -) -class CliProtonJ2Receiver extends CliProtonJ2SenderReceiver implements Callable { - - @Option(names = {"--log-msgs"}, description = "MD5, SHA-1, SHA-256, ...") - private String logMsgs = "MD5"; - - @Option(names = {"--msg-content-hashed"}) - private String msgContentHashedString = "false"; - - @Option(names = {"--broker"}, description = "MD5, SHA-1, SHA-256, ...") - private String broker = "MD5"; - - @Option(names = {"--conn-username"}, description = "MD5, SHA-1, SHA-256, ...") - private String connUsername = "MD5"; - - @Option(names = {"--conn-password"}, description = "MD5, SHA-1, SHA-256, ...") - private String connPassword = "MD5"; - - @Option(names = {"--conn-clientid"}) - private String connClientId; - - @Option(names = {"--durable-subscriber"}) - private String durableSubscriberString = "false"; - - @Option(names = {"--durable-subscriber-name"}) - private String durableSubscriberName; - - // TODO not implemented - @Option(names = {"--subscriber-unsubscribe"}) - private String subscriberUnsubscribeString; - - @Option(names = {"--address"}, description = "MD5, SHA-1, SHA-256, ...") - private String address = "MD5"; - - @Option(names = {"--recv-browse"}, description = "browse queued messages instead of receiving them") - private String recvBrowseString = "false"; - - @Option(names = {"--count"}, description = "MD5, SHA-1, SHA-256, ...") - private int count = 1; - - @Option(names = {"--timeout"}, description = "MD5, SHA-1, SHA-256, ...") - private int timeout; - - @Option(names = {"--conn-auth-mechanisms"}, description = "MD5, SHA-1, SHA-256, ...") - // todo, want to accept comma-separated lists; there is https://picocli.info/#_split_regex - private List connAuthMechanisms = new ArrayList<>(); - - @Option(names = {"--process-reply-to"}) - private boolean processReplyTo = false; - - @Option(names = {"--duration"}) // todo - private Integer duration; - - @Option(names = {"--duration-mode"}) // todo - private DurationMode durationMode; - - @Option(names = {"--ssn-ack-mode"}) - private SsnAckMode ssnAckMode; - - @Override - public Integer call() throws Exception { // your business logic goes here... - String prefix = ""; - if (!broker.startsWith("amqp://") || !broker.startsWith("amqps://")) { - prefix = "amqp://"; - } - final URI url = new URI(prefix + broker); - final String serverHost = url.getHost(); - int serverPort = url.getPort(); - serverPort = (serverPort == -1) ? 5672 : serverPort; - - String destinationCapability = "queue"; - if (address.startsWith(TOPIC_PREFIX)) { - address = address.substring((TOPIC_PREFIX.length())); - destinationCapability = "topic"; - } - if (address.startsWith(QUEUE_PREFIX)) { - address = address.substring((QUEUE_PREFIX.length())); - } - - ClientOptions clientOptions = new ClientOptions(); - // TODO api usability I had to hunt for this a bit; the idea is to have durable subscription: need specify connection id and subscriber name - if (connClientId != null) { - clientOptions.id(connClientId); - } - - // TODO api usability; If I use the w/ clientOptions variant of Client.create, then .id defaults to null, and I get exception; - // ok, that just cannot be true ^^^; but it looks to be true; what!?! - // aha, right; constructor does not check, factory method does check for null - // proposed solution: allow null there, and let it mean autoassign; or tell us method to generate ID ourselves if we don't care - Client client; - if (clientOptions.id() != null) { - client = Client.create(clientOptions); - } else { - client = Client.create(); - } - - final ConnectionOptions options = new ConnectionOptions(); - options.user(connUsername); - options.password(connPassword); - for (AuthMechanism mech : connAuthMechanisms) { - options.saslOptions().addAllowedMechanism(mech.name()); - } - - /* - TODO API usability, hard to ask for queue when dealing with broker that likes to autocreate topics - */ - ReceiverOptions receiverOptions = new ReceiverOptions(); - // is it target or source? target. - receiverOptions.sourceOptions().capabilities(destinationCapability); - - // todo: another usability, little hard to figure out this is analogue of jms to browse queues - if (stringToBool(recvBrowseString)) { - receiverOptions.sourceOptions().distributionMode(DistributionMode.COPY); - } - - // TODO: API question: what is difference between autoSettle and autoAccept? why I want one but not the other? - if(ssnAckMode != null) { - if (ssnAckMode == SsnAckMode.client) { - receiverOptions.autoAccept(false); - receiverOptions.autoSettle(false); - } - } - - try (Connection connection = client.connect(serverHost, serverPort, options)) { - Receiver receiver; - if (stringToBool(durableSubscriberString)) { - receiver = connection.openDurableReceiver(address, durableSubscriberName, receiverOptions); - } else { - receiver = connection.openReceiver(address, receiverOptions); - } - - double initialTimestamp = Utils.getTime(); - for (int i = 0; i < count; i++) { - -// if (durationMode == DurationMode.sleepBeforeReceive) { -// LOG.trace("Sleeping before receive"); -// Utils.sleepUntilNextIteration(initialTimestamp, msgCount, duration, i + 1); -// } - - final Delivery delivery; - if (timeout == 0) { - delivery = receiver.receive(); // todo: can default it to -1 - } else { - delivery = receiver.receive(timeout, TimeUnit.SECONDS); - } - - if (delivery == null) { - break; - } - - if (durationMode == DurationMode.afterReceive) { -// LOG.trace("Sleeping after receive"); - Utils.sleepUntilNextIteration(initialTimestamp, count, duration, i + 1); // todo possibly it is i, different loop here - } - - if (processReplyTo && delivery.message().replyTo() != null) { - String replyTo = delivery.message().replyTo(); - Message message = delivery.message(); - message.replyTo(null); - try (Sender sender = connection.openSender(replyTo)) { - sender.send(message); - } - } - - int messageFormat = delivery.messageFormat(); - Message message = delivery.message(); - - // todo, is this what we mean? - if (ssnAckMode != null && ssnAckMode == SsnAckMode.client) { - delivery.accept(); - } - - logMessage(address, message, stringToBool(msgContentHashedString)); - } - - // TODO API usability, how do I do durable subscription with detach, resume, etc; no mention of unsubscribe in the client anywhere - receiver.close(); // TODO want to do autoclosable, need helper func, that's all -// receiver.detach(); - } - - return 0; - } - -} diff --git a/cli-protonj2/src/main/java/com/redhat/mqe/PropertyType.java b/cli-protonj2/src/main/java/com/redhat/mqe/PropertyType.java new file mode 100644 index 00000000..06b439f7 --- /dev/null +++ b/cli-protonj2/src/main/java/com/redhat/mqe/PropertyType.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2021 Red Hat, Inc. + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 + * + * http://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 com.redhat.mqe; + +public enum PropertyType { + String("string"); + + private final String value; + + PropertyType(String value) { + this.value = value; + } + + @Override + public String toString() { + return value; + } +} diff --git a/cli-protonj2/src/main/java/com/redhat/mqe/ProtonJ2MessageFormatter.java b/cli-protonj2/src/main/java/com/redhat/mqe/ProtonJ2MessageFormatter.java new file mode 100644 index 00000000..5bbf2da7 --- /dev/null +++ b/cli-protonj2/src/main/java/com/redhat/mqe/ProtonJ2MessageFormatter.java @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2021 Red Hat, Inc. + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 + * + * http://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 com.redhat.mqe; + +import com.redhat.mqe.lib.MessageFormatter; +import org.apache.qpid.protonj2.client.Message; +import org.apache.qpid.protonj2.client.exceptions.ClientException; + +import java.util.HashMap; +import java.util.Map; + +public class ProtonJ2MessageFormatter extends MessageFormatter { + + public Map formatMessage(String address, Message message, boolean msgContentHashed) throws ClientException { + Map map = new HashMap<>(); + map.put("address", address); + map.put("group-id", message.groupId()); + map.put("subject", message.subject()); + map.put("user-id", message.userId()); + map.put("correlation-id", message.correlationId()); + map.put("content-encoding", message.contentEncoding()); + map.put("priority", (int) message.priority()); // TODO(ENTMQCL-2973) remove cast + map.put("type", message.contentType()); +// map.put("ttl", message.timeToLive()); // todo, why do we do the weird thing below instead of this? + map.put("ttl", getTtl(message)); + map.put("absolute-expiry-time", message.absoluteExpiryTime()); + if (msgContentHashed) { + map.put("content", MessageFormatter.hash(formatObject(message.body()))); + } else { + map.put("content", message.body()); + } + map.put("redelivered", message.deliveryCount() > 1); + map.put("reply-to-group-id", message.replyToGroupId()); + map.put("durable", message.durable()); + map.put("group-sequence", (long) message.groupSequence()); // TODO(ENTMQCL-2973) remove cast + map.put("creation-time", message.creationTime()); + map.put("content-type", message.contentType()); + map.put("id", message.messageId()); + map.put("reply-to", message.replyTo()); + + // getPropertyNames? from JMS missing? + Map propertyMap = new HashMap<>(); + message.forEachProperty((s, o) -> { + propertyMap.put((String) s, o); // this wanted to cast to string when I removed message generic type; what??? TODO + }); + map.put("properties", propertyMap); + + return map; + } + + + /** + * Calculate TTL of given message from message + * expiration time and message timestamp. + *

+ * Returns the time the message expires, which is the sum of the time-to-live value + * specified by the client and the GMT at the time of the send + * EXP_TIME = CLIENT_SEND+TTL (CLIENT_SEND??) + * CLIENT_SEND time is approximately getJMSTimestamp() (time value between send()/publish() and return) + * TODO - check for correctness + * + * @param message calculate TTL for this message + * @return positive long number if TTL was calculated. Long.MIN_VALUE if error. + */ + public static long getTtl(Message message) { + long ttl = 0; + try { + long expiration = message.absoluteExpiryTime(); + long timestamp = message.creationTime(); + if (expiration != 0 && timestamp != 0) { + ttl = expiration - timestamp; + } + } catch (ClientException jmse) { +// LOG.error("Error while calculating TTL value.\n" + jmse.getMessage()); + jmse.printStackTrace(); + System.exit(1); + } + return ttl; + } +} diff --git a/cli-protonj2/src/test/java/com/redhat/mqe/MainTest.java b/cli-protonj2/src/test/java/com/redhat/mqe/MainTest.java index 219d031c..02a9db1c 100644 --- a/cli-protonj2/src/test/java/com/redhat/mqe/MainTest.java +++ b/cli-protonj2/src/test/java/com/redhat/mqe/MainTest.java @@ -226,7 +226,7 @@ void test2(@BrokerFixture.TempBroker Broker broker) throws Throwable { checkMainInvocation("sender --log-msgs dict --broker " + brokerUrl + " --conn-auth-mechanisms PLAIN --conn-username admin --conn-password admin --address test_amqp_bare_message_consistency --count 1 --msg-subject amqp_bare_message_test --msg-reply-to ExpiryQueue --msg-property PI=~3.141592 --msg-property color=red --msg-property mapKey=mapValue --msg-content amqp_bare_msg-CBJJIY --msg-durable True --msg-ttl 300000 --msg-correlation-id amqp_bare_msg-CBJJIY --msg-user-id admin --msg-priority 7 --conn-populate-user-id True --msg-group-id group-a --msg-group-seq 1 --msg-reply-to-group-id group-a"); // tests.JAMQMessage000Tests.JAMQMessageTests.test_populate_validated_user_option - // FAIL dtestlib.Test:levels.py:61 Checking properties keys for validated user with expected '_AMQ_VALIDATED_USER' or 'JMSXUserID': dict_keys([]) # result:False (exp. True), dur.:-1.00 err_cnt:1 + // TODO FAIL dtestlib.Test:levels.py:61 Checking properties keys for validated user with expected '_AMQ_VALIDATED_USER' or 'JMSXUserID': dict_keys([]) # result:False (exp. True), dur.:-1.00 err_cnt:1 // tests.JAMQMessage000Tests.JAMQMessageTests.test_scheduled_message_zero_timestamp // Unknown options: '--msg-id' @@ -238,7 +238,9 @@ void test2(@BrokerFixture.TempBroker Broker broker) throws Throwable { checkMainInvocation("sender --log-msgs dict --broker " + brokerUrl + " --conn-auth-mechanisms PLAIN --conn-username admin --conn-password admin --address test_client_acknowledge_inactivity_exception --count 20 --msg-durable True --ssn-ack-mode client"); checkMainInvocation("receiver --timeout 10 --log-msgs dict --broker " + brokerUrl + " --conn-auth-mechanisms PLAIN --conn-username admin --conn-password admin --address test_client_acknowledge_inactivity_exception --count 20 --duration 100 --duration-mode after-receive --ssn-ack-mode client"); - //checkMainInvocation("sender --log-msgs dict --broker " + brokerUrl + " --conn-auth-mechanisms PLAIN --conn-username admin --conn-password admin --address test_direct_transient_text_message --count 1 --msg-content SimpleTextMessage --msg-correlation-id corr-id-eqa9vp"); + +// +// checkMainInvocation("sender --log-msgs dict --broker " + brokerUrl + " --conn-auth-mechanisms PLAIN --conn-username admin --conn-password admin --address test_direct_transient_text_message --count 1 --msg-content SimpleTextMessage --msg-correlation-id corr-id-eqa9vp"); } // void testMessageContentListItem() { diff --git a/cli-protonj2/src/test/java/com/redhat/mqe/MessageLoggingTest.java b/cli-protonj2/src/test/java/com/redhat/mqe/MessageLoggingTest.java new file mode 100644 index 00000000..c0338139 --- /dev/null +++ b/cli-protonj2/src/test/java/com/redhat/mqe/MessageLoggingTest.java @@ -0,0 +1,119 @@ +/* + * Copyright (c) 2021 Red Hat, Inc. + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 + * + * http://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 com.redhat.mqe; + +import com.redhat.mqe.lib.MessageFormatter; +import org.apache.qpid.protonj2.client.Message; +import org.apache.qpid.protonj2.client.exceptions.ClientException; + +import java.util.List; +import java.util.stream.Collectors; + +class PreviousImplementation { + void logMessage(String address, Message message, boolean msgContentHashed) throws ClientException { + StringBuilder sb = new StringBuilder(); + + sb.append("{"); + + addKeyValue(sb, "address", address); + addKeyValue(sb, "group-id", message.groupId()); + addKeyValue(sb, "subject", message.subject()); + addKeyValue(sb, "user-id", message.userId()); + addKeyValue(sb, "correlation-id", message.correlationId()); + addKeyValue(sb, "content-encoding", message.contentEncoding()); + addKeyValue(sb, "priority", message.priority()); + addKeyValue(sb, "type", "string"); // ??? + addKeyValue(sb, "ttl", message.timeToLive()); + addKeyValue(sb, "absolute-expiry-time", message.absoluteExpiryTime()); + if (msgContentHashed) { + // this is inlined addKeyValue, TODO do it nicer + sb.append("'"); + sb.append("content"); + sb.append("': "); + sb.append("'"); // extra quotes to format + sb.append(MessageFormatter.hash(formatPython(message.body()))); + sb.append("'"); + sb.append(", "); + } else { + addKeyValue(sb, "content", message.body()); + } + addKeyValue(sb, "redelivered", message.deliveryCount() > 1); + addKeyValue(sb, "reply-to-group-id", message.replyToGroupId()); + addKeyValue(sb, "durable", message.durable()); + addKeyValue(sb, "group-sequence", message.groupSequence()); + addKeyValue(sb, "creation-time", message.creationTime()); + addKeyValue(sb, "content-type", message.contentType()); + addKeyValue(sb, "id", message.messageId()); + addKeyValue(sb, "reply-to", message.replyTo()); + + // getPropertyNames? from JMS missing? + StringBuilder sbb = new StringBuilder(); + sbb.append('{'); +// AtomicBoolean first = new AtomicBoolean(true); + message.forEachProperty((s, o) -> { +// if (!first.get()) { +// sbb.append(", "); +// first.set(false); +// } + addKeyValue(sbb, (String) s, o); // this wanted to cast to string when I removed message generic type; what??? TODO + }); + if (message.hasProperties()) { + sbb.delete(sbb.length() - 2, sbb.length()); // remove last ", " + } + sbb.append('}'); + addKeyValue(sb, "properties", sbb); // ??? + + sb.delete(sb.length() - 2, sb.length()); // remove last ", " + + sb.append("}"); + + System.out.println(sb); + } + + void addKeyValue(StringBuilder sb, String key, Object value) { + sb.append("'"); + sb.append(key); + sb.append("': "); + sb.append(formatPython(value)); + sb.append(", "); + } + + String formatPython(Object parameter) { + if (parameter == null) { + return "None"; + } + if (parameter instanceof String) { + return "'" + parameter + "'"; + } + if (parameter instanceof Boolean) { + return ((boolean)parameter) ? "True" : "False"; + } + if (parameter instanceof StringBuilder) { + return parameter.toString(); + } + if (parameter instanceof List) { + return "[" + ((List) parameter).stream().map(this::formatPython).collect(Collectors.joining(", ")) + "]"; + } + return "'" + parameter + "'"; + } +} + +public class MessageLoggingTest { +} diff --git a/cli-protonj2/src/test/kotlin/MainTest.kt b/cli-protonj2/src/test/kotlin/MainTest.kt new file mode 100644 index 00000000..f4ddfde9 --- /dev/null +++ b/cli-protonj2/src/test/kotlin/MainTest.kt @@ -0,0 +1,235 @@ +/* + * Copyright (c) 2021 Red Hat, Inc. + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 + * + * http://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 com.redhat.mqe + +import AbstractMainTest +import com.google.common.truth.Truth.assertThat +import com.redhat.mqe.lib.MessageFormatter +import org.junit.jupiter.api.Disabled +import org.junit.jupiter.api.Tag +import org.junit.jupiter.api.Test +import picocli.CommandLine +import java.io.File +import java.nio.file.Files + +class ProtonJ2ClientListener(private val clientListener: ClientListener) : ProtonJ2MessageFormatter() { + override fun printMessageAsPython(format: MutableMap?) { + clientListener.onMessage(format) + super.printMessageAsPython(format) + } +} + +@Disabled("fails") +@Tag("external") +class ProtonJ2MainTest : AbstractMainTest() { + + override val brokerUrl = "amqp://127.0.0.1:61616" + override val sslBrokerUrl = "amqps://127.0.0.1:61617" + + override val senderAdditionalOptions = """ +--capacity 1 +--conn-async-acks true +--conn-async-send true +--conn-auth-mechanisms anonymous +--conn-auth-sasl false +--conn-cache-ena false +--conn-cache-size 1 +--conn-clientid aClientId +--conn-clientid-prefix aClientIdPrefix +--conn-close-timeout 1000 +--conn-conn-timeout 1000 +--conn-connid-prefix aConnIdPrefix +--conn-heartbeat 1000 +--conn-local-msg-priority true +--conn-max-frame-size 4096 +--conn-prefetch 1 +--conn-prefetch-browser 1 +--conn-prefetch-queue 1 +--conn-prefetch-topic 1 +--conn-prefetch-topic-dur 1 +--conn-prefix-packet-size-ena false +--conn-queue-prefix aQueuePrefix +--conn-reconnect true +--conn-reconnect-backoff false +--conn-reconnect-backoff-multiplier 1 +--conn-reconnect-initial-delay 1 +--conn-reconnect-interval 1000 +--conn-reconnect-limit 1000 +--conn-reconnect-start-limit 1000 +--conn-reconnect-timeout 1000 +--conn-reconnect-warn-attempts 1 +--conn-redeliveries-max 1 +--conn-server-stack-trace-ena false +--conn-sync-send true +--conn-tcp-buf-size-recv 1 +--conn-tcp-buf-size-send 1 +--conn-tcp-conn-timeout 1000 +--conn-tcp-keep-alive true +--conn-tcp-no-delay false +--conn-tcp-sock-linger 1000 +--conn-tcp-sock-timeout 1000 +--conn-tcp-traffic-class 1 +--conn-tight-encoding-ena false +--conn-topic-prefix aTopicPrefix +--conn-valid-prop-names false +--msg-content-type aMsgContentType +--msg-correlation-id aCorrelationId +--msg-durable false +--msg-group-id aMsgGroupId +--msg-group-seq -1 +--msg-no-timestamp true +--msg-priority 1 +--timeout 2 +--tx-size 1 +--msg-reply-to aReplyToQueue +--msg-reply-to-group-id aReplyToGroupId +--msg-subject aMsgSubject +--msg-ttl 10000 +--msg-user-id aMsgUserId +--property-type String +""".split(" ", "\n").toTypedArray() + + // cannot set Client ID, because more than one connection is created, and these would clash +//--conn-clientid aClientId + override val connectorAdditionalOptions = """ +--conn-async-acks true +--conn-async-send true +--conn-auth-mechanisms anonymous +--conn-auth-sasl false +--conn-cache-ena false +--conn-cache-size 1 +--conn-clientid-prefix aClientIdPrefix +--conn-close-timeout 1000 +--conn-conn-timeout 1000 +--conn-connid-prefix aConnIdPrefix +--conn-heartbeat 1000 +--conn-local-msg-priority true +--conn-max-frame-size 4096 +--conn-prefetch 1 +--conn-prefetch-browser 1 +--conn-prefetch-queue 1 +--conn-prefetch-topic 1 +--conn-prefetch-topic-dur 1 +--conn-prefix-packet-size-ena false +--conn-queue-prefix aQueuePrefix +--conn-reconnect true +--conn-reconnect-backoff false +--conn-reconnect-backoff-multiplier 1 +--conn-reconnect-initial-delay 1 +--conn-reconnect-interval 1000 +--conn-reconnect-limit 1000 +--conn-reconnect-start-limit 1000 +--conn-reconnect-timeout 1000 +--conn-reconnect-warn-attempts 1 +--conn-redeliveries-max 1 +--conn-server-stack-trace-ena false +--conn-sync-send true +--conn-tcp-buf-size-recv 1 +--conn-tcp-buf-size-send 1 +--conn-tcp-conn-timeout 1000 +--conn-tcp-keep-alive true +--conn-tcp-no-delay false +--conn-tcp-sock-linger 1000 +--conn-tcp-sock-timeout 1000 +--conn-tcp-traffic-class 1 +--conn-tight-encoding-ena false +--conn-topic-prefix aTopicPrefix +--conn-valid-prop-names false +""".split(" ", "\n").toTypedArray() + + override fun main_(listener: ClientListener, args: Array) { + val protonJ2ClientListener = ProtonJ2ClientListener(listener) + val main = when (args[0]) { + "sender" -> CommandLine(CliProtonJ2Sender(protonJ2ClientListener)) + "receiver" -> CommandLine(CliProtonJ2Receiver(protonJ2ClientListener)) + "connector" -> CommandLine(CliProtonJ2Connector()) + else -> throw NotImplementedError(args[0]) + } + val returnCode = main.execute(*(args.drop(1).toTypedArray())) + } + + override val prefix: String + get() = "ProtonJ2MainTest" + + /** + * Large message streaming from/to java.io.{Input,Output}Stream is artemis-jms-client only + */ + @Test + fun sendLargeMessageStreamFile() { + val file = File.createTempFile(address, null) + val outputDirectory = Files.createTempDirectory(address) + val output = outputDirectory.resolve("message") + val output0 = outputDirectory.resolve("message_0") + try { + file.writeText("aContent") + val senderParameters = + "sender --log-msgs dict --broker $brokerUrl --address $address --count 1 --msg-content-from-file $file --msg-content-binary true --msg-content-stream true".split( + " " + ).toTypedArray() + val receiverParameters = + "receiver --log-msgs dict --broker $brokerUrl --address $address --count 1 --msg-binary-content-to-file $output".split( + " " + ).toTypedArray() + + print("Sending: ") + main(senderParameters) + print("Receiving: ") + main(receiverParameters) + + assertThat(output0.toFile().readBytes()).isEqualTo(file.readBytes()) + } finally { + file.delete() + outputDirectory.toFile().deleteRecursively() + } + } + + /** + * Large message streaming from/to java.io.{Input,Output}Stream is artemis-jms-client only + */ + @Test + @Disabled("https://github.com/rh-messaging/cli-java/issues/50") + fun sendAndReceiveLargeMessageStreamFile() { + val file = File.createTempFile(address, "input") + val outputDirectory = Files.createTempDirectory(address) + val output = outputDirectory.resolve("message") + val output0 = outputDirectory.resolve("message_0") + try { + file.writeText("aContent") + val senderParameters = + "sender --log-msgs dict --broker $brokerUrl --address $address --count 1 --msg-content-from-file $file --msg-content-binary true --msg-content-stream true".split( + " " + ).toTypedArray() + val receiverParameters = + "receiver --log-msgs dict --broker $brokerUrl --address $address --count 1 --msg-binary-content-to-file $output --msg-content-stream true".split( + " " + ).toTypedArray() + + print("Sending: ") + main(senderParameters) + print("Receiving: ") + main(receiverParameters) + + assertThat(output0.toFile().readBytes()).isEqualTo(file.readBytes()) + } finally { + file.delete() + outputDirectory.toFile().deleteRecursively() + } + } +} diff --git a/interop-tests/src/test/kotlin/ClientFormatterSpy.kt b/interop-tests/src/test/kotlin/ClientFormatterSpy.kt index c369bb1c..f449e9e4 100644 --- a/interop-tests/src/test/kotlin/ClientFormatterSpy.kt +++ b/interop-tests/src/test/kotlin/ClientFormatterSpy.kt @@ -17,6 +17,9 @@ * limitations under the License. */ +import com.redhat.mqe.CliProtonJ2Receiver +import com.redhat.mqe.CliProtonJ2Sender +import com.redhat.mqe.ProtonJ2MessageFormatter import com.redhat.mqe.acc.AccClientOptionManager import com.redhat.mqe.acc.AccConnectionManagerFactory import com.redhat.mqe.acc.AccCoreJmsMessageFormatter @@ -27,11 +30,19 @@ import com.redhat.mqe.jms.AacConnectionManagerFactory import com.redhat.mqe.jms.AacReceiverOptions import com.redhat.mqe.jms.AacSenderOptions import com.redhat.mqe.lib.* +import picocli.CommandLine import javax.jms.Message -class ClientFormatterSpy(private val formatter: JmsMessageFormatter) : JmsMessageFormatter() { +interface IClientFormatterSpy { + val messages: MutableList> + fun printMessageAsPython(format: MutableMap?) + fun run() +} + +class ClientFormatterSpy(private val formatter: JmsMessageFormatter) : JmsMessageFormatter(), IClientFormatterSpy { lateinit var client: CoreClient - val messages: MutableList> = ArrayList() + + override val messages: MutableList> = ArrayList() override fun formatMessage(msg: Message?, hashContent: Boolean): MutableMap = formatter.formatMessage(msg, hashContent) @@ -41,11 +52,13 @@ class ClientFormatterSpy(private val formatter: JmsMessageFormatter) : JmsMessag super.printMessageAsPython(format) } - fun run() { + override fun run() { client.startClient() } companion object { + //region Qpid Jms + fun makeAacSenderClient(args: Array): ClientFormatterSpy { val connectionManagerFactory = AacConnectionManagerFactory() val messageFormatter: JmsMessageFormatter = AMQPJmsMessageFormatter() @@ -82,7 +95,9 @@ class ClientFormatterSpy(private val formatter: JmsMessageFormatter) : JmsMessag spy.client = MessageBrowser(options, connectionManagerFactory, spy) return spy } + //endregion + //region Artemis Core fun makeAccSenderClient(args: Array): ClientFormatterSpy { val connectionManagerFactory = AccConnectionManagerFactory() @@ -120,7 +135,9 @@ class ClientFormatterSpy(private val formatter: JmsMessageFormatter) : JmsMessag spy.client = MessageBrowser(options, connectionManagerFactory, spy) return spy } + //endregion + //region ActiveMQ fun makeAocSenderClient(args: Array): ClientFormatterSpy { val connectionManagerFactory = AocConnectionManagerFactory() @@ -158,5 +175,33 @@ class ClientFormatterSpy(private val formatter: JmsMessageFormatter) : JmsMessag spy.client = MessageBrowser(options, connectionManagerFactory, spy) return spy } + //endregion + + //region ProtonJ2 + + fun makeProtonj2SenderClient(args: Array): ProtonJ2ClientFormatterSpy { + val messageFormatter = ProtonJ2MessageFormatter() + val messageFormatterSpy = ProtonJ2ClientFormatterSpy() + + messageFormatterSpy.client = CommandLine(CliProtonJ2Sender(messageFormatterSpy)) + messageFormatterSpy.args = args + + return messageFormatterSpy; + } + + fun makeProtonj2ReceiverClient(args: Array): ProtonJ2ClientFormatterSpy { + val messageFormatter = ProtonJ2MessageFormatter() + val messageFormatterSpy = ProtonJ2ClientFormatterSpy() + + messageFormatterSpy.client = CommandLine(CliProtonJ2Receiver(messageFormatterSpy)) + messageFormatterSpy.args = args + + return messageFormatterSpy + } + + fun makeProtonj2BrowserClient(args: Array): ProtonJ2ClientFormatterSpy { + return makeProtonj2ReceiverClient(args + "--recv-browse" + "true") + } + //endregion } } diff --git a/interop-tests/src/test/kotlin/InteropTest.kt b/interop-tests/src/test/kotlin/InteropTest.kt index 675d3cf8..cdc5cd39 100644 --- a/interop-tests/src/test/kotlin/InteropTest.kt +++ b/interop-tests/src/test/kotlin/InteropTest.kt @@ -148,7 +148,7 @@ class InteropTest : AbstractTest() { companion object { @JvmStatic fun clientCombinationsProvider(): Stream { - val clients = listOf("aac", "acc", "aoc") + val clients = listOf("aac", "acc", "aoc", "protonj2") return clients.flatMap { s -> clients.map { r -> Arguments.of(s, r) } }.stream() } } diff --git a/interop-tests/src/test/kotlin/ProtonJ2ClientFormatterSpy.kt b/interop-tests/src/test/kotlin/ProtonJ2ClientFormatterSpy.kt new file mode 100644 index 00000000..646dbd83 --- /dev/null +++ b/interop-tests/src/test/kotlin/ProtonJ2ClientFormatterSpy.kt @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2017 Red Hat, Inc. + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 + * + * http://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. + */ + +import com.google.common.truth.Truth +import com.redhat.mqe.ProtonJ2MessageFormatter +import picocli.CommandLine + +class ProtonJ2ClientFormatterSpy : ProtonJ2MessageFormatter(), IClientFormatterSpy { + lateinit var args: Array + lateinit var client: CommandLine + + override val messages: MutableList> = ArrayList() + + override fun printMessageAsPython(format: MutableMap?) { + messages.add(format!!.toMap()) + super.printMessageAsPython(format) + } + + override fun run() { + val exitCode = client.execute(*args) + Truth.assertThat(exitCode).isEqualTo(0) + } +} diff --git a/jmslib/src/main/java/com/redhat/mqe/lib/Content.java b/lib/src/main/java/com/redhat/mqe/lib/Content.java similarity index 93% rename from jmslib/src/main/java/com/redhat/mqe/lib/Content.java rename to lib/src/main/java/com/redhat/mqe/lib/Content.java index d7140dbe..a997f3f7 100644 --- a/jmslib/src/main/java/com/redhat/mqe/lib/Content.java +++ b/lib/src/main/java/com/redhat/mqe/lib/Content.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Red Hat, Inc. + * Copyright (c) 2021 Red Hat, Inc. * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -36,7 +36,7 @@ public class Content { private String key; private Object value; private Class type; - private boolean isMap; + private final boolean isMap; /** * Create content from defined rules. @@ -65,7 +65,7 @@ public Content(String contentType, String parsedValue, boolean isMap) { splitValue = parsedValue.substring(parsedValue.indexOf(splitter) + 1); } } else if (parsedValue.contains("=")) { - // last argument 'allowExplicityRetype' can be omitted as parsedValue will not by autotypecasted - no '~' + // last argument 'allowExplicitlyRetype' can be omitted as parsedValue will not by autotypecasted - no '~' splitValue = parsedValue.substring(parsedValue.indexOf(splitter) + 1); } else { splitter = "~"; @@ -93,6 +93,9 @@ public Content(String contentType, String parsedValue, boolean isMap) { } public String getKey() { + if (!isMap) { + throw new IllegalStateException("Only maps have keys"); + } return key; } diff --git a/lib/src/main/java/com/redhat/mqe/lib/MessageFormatter.java b/lib/src/main/java/com/redhat/mqe/lib/MessageFormatter.java index 9e816e6f..a7004b64 100644 --- a/lib/src/main/java/com/redhat/mqe/lib/MessageFormatter.java +++ b/lib/src/main/java/com/redhat/mqe/lib/MessageFormatter.java @@ -26,6 +26,7 @@ import java.io.UnsupportedEncodingException; import java.math.BigInteger; +import java.nio.charset.StandardCharsets; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.Hashtable; @@ -116,6 +117,9 @@ protected StringBuilder formatDouble(double in_data) { return int_res; } + /** + Formats object as Python + */ @SuppressWarnings("unchecked") protected StringBuilder formatObject(Object in_data) { StringBuilder int_res = new StringBuilder(); @@ -138,14 +142,8 @@ protected StringBuilder formatObject(Object in_data) { } else if (in_data instanceof UUID) { int_res.append(formatString(in_data.toString())); } else if (in_data instanceof byte[]) { - try { - String value = new String((byte[]) in_data, "UTF-8"); - int_res.append(formatString(value)); - } catch (UnsupportedEncodingException uee) { - LOG.error("Error while getting message properties!", uee.getMessage()); - uee.printStackTrace(); - System.exit(1); - } + String value = new String((byte[]) in_data, StandardCharsets.UTF_8); + int_res.append(formatString(value)); } else { handleUnsupportedObjectMessagePayloadType(int_res, in_data); } diff --git a/jmslib/src/main/java/com/redhat/mqe/lib/Utils.java b/lib/src/main/java/com/redhat/mqe/lib/Utils.java similarity index 100% rename from jmslib/src/main/java/com/redhat/mqe/lib/Utils.java rename to lib/src/main/java/com/redhat/mqe/lib/Utils.java From 0a5e69fcf961e82e88321c9cf8381062c7779eee Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Sep 2021 14:18:54 +0200 Subject: [PATCH 028/435] Bump checker-qual from 3.17.0 to 3.18.0 (#288) Bumps [checker-qual](https://github.com/typetools/checker-framework) from 3.17.0 to 3.18.0. - [Release notes](https://github.com/typetools/checker-framework/releases) - [Changelog](https://github.com/typetools/checker-framework/blob/master/docs/CHANGELOG.md) - [Commits](https://github.com/typetools/checker-framework/compare/checker-framework-3.17.0...checker-framework-3.18.0) --- updated-dependencies: - dependency-name: org.checkerframework:checker-qual dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 003e5e9b..24a53a99 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -57,7 +57,7 @@ 2.7 22.0.0 - 3.17.0 + 3.18.0 From 03486f131816a0f17af72bab7602684dd26c930e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Mon, 18 Oct 2021 16:04:11 +0200 Subject: [PATCH 029/435] Various cli-protonj2 improvements (#302) * Add additional options to cli-protonj2 * Plug cli-protonj2 into selftests * Add --msg-content-to-file, * Fix --subscriber-unsubscribe * Add --out to sender * Fix msgPriority type * Add missing enums * fixup subscriberUnsubscribeString --- .../com/redhat/mqe/CliProtonJ2Receiver.java | 55 +++++++++++++++---- .../com/redhat/mqe/CliProtonJ2Sender.java | 31 ++++++++--- .../java/com/redhat/mqe/DurationMode.java | 3 +- .../src/main/java/com/redhat/mqe/LogLib.java | 24 ++++++++ .../src/main/java/com/redhat/mqe/Main.java | 2 +- .../src/main/java/com/redhat/mqe/Out.java | 24 ++++++++ 6 files changed, 120 insertions(+), 19 deletions(-) create mode 100644 cli-protonj2/src/main/java/com/redhat/mqe/LogLib.java create mode 100644 cli-protonj2/src/main/java/com/redhat/mqe/Out.java diff --git a/cli-protonj2/src/main/java/com/redhat/mqe/CliProtonJ2Receiver.java b/cli-protonj2/src/main/java/com/redhat/mqe/CliProtonJ2Receiver.java index ab78e939..353aa373 100644 --- a/cli-protonj2/src/main/java/com/redhat/mqe/CliProtonJ2Receiver.java +++ b/cli-protonj2/src/main/java/com/redhat/mqe/CliProtonJ2Receiver.java @@ -33,6 +33,10 @@ import picocli.CommandLine; import java.net.URI; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -55,6 +59,9 @@ public class CliProtonJ2Receiver extends CliProtonJ2SenderReceiver implements Ca @CommandLine.Option(names = {"--log-msgs"}, description = "MD5, SHA-1, SHA-256, ...") private LogMsgs logMsgs = LogMsgs.dict; + @CommandLine.Option(names = {"--out"}, description = "MD5, SHA-1, SHA-256, ...") + private Out out = Out.python; + @CommandLine.Option(names = {"--msg-content-hashed"}) private String msgContentHashedString = "false"; @@ -76,9 +83,8 @@ public class CliProtonJ2Receiver extends CliProtonJ2SenderReceiver implements Ca @CommandLine.Option(names = {"--durable-subscriber-name"}) private String durableSubscriberName; - // TODO not implemented @CommandLine.Option(names = {"--subscriber-unsubscribe"}) - private String subscriberUnsubscribeString; + private String subscriberUnsubscribeString = "false"; @CommandLine.Option(names = {"-a", "--address"}, description = "MD5, SHA-1, SHA-256, ...") private String address = "MD5"; @@ -108,6 +114,9 @@ public class CliProtonJ2Receiver extends CliProtonJ2SenderReceiver implements Ca @CommandLine.Option(names = {"--ssn-ack-mode"}) private SsnAckMode ssnAckMode; + @CommandLine.Option(names = {"--msg-content-to-file"}) + private String msgContentToFile; + public CliProtonJ2Receiver() { this.messageFormatter = new ProtonJ2MessageFormatter(); } @@ -188,6 +197,11 @@ public Integer call() throws Exception { // your business logic goes here... receiver = connection.openReceiver(address, receiverOptions); } + if (stringToBool(subscriberUnsubscribeString)) { + receiver.close(); + return 0; + } + double initialTimestamp = Utils.getTime(); for (int i = 0; i < count; i++) { @@ -230,19 +244,40 @@ public Integer call() throws Exception { // your business logic goes here... } Map messageDict = messageFormatter.formatMessage(address, message, stringToBool(msgContentHashedString)); - switch (logMsgs) { - case dict: - messageFormatter.printMessageAsPython(messageDict); + if (msgContentToFile != null) { + // todo? + Path file = Paths.get(msgContentToFile + "_" + i); + Files.write(file, message.body().toString().getBytes(StandardCharsets.UTF_8)); + } + switch(out) { + case python: + switch (logMsgs) { + case dict: + messageFormatter.printMessageAsPython(messageDict); + break; + case interop: + messageFormatter.printMessageAsPython(messageDict); + break; + } break; - case interop: - messageFormatter.printMessageAsJson(messageDict); + case json: + switch (logMsgs) { + case dict: + messageFormatter.printMessageAsJson(messageDict); + break; + case interop: + messageFormatter.printMessageAsJson(messageDict); + break; + } break; } } - // TODO API usability, how do I do durable subscription with detach, resume, etc; no mention of unsubscribe in the client anywhere - receiver.close(); // TODO want to do autoclosable, need helper func, that's all -// receiver.detach(); + if (stringToBool(durableSubscriberString)) { + receiver.detach(); + } else { + receiver.close(); // TODO want to do autoclosable, need helper func, that's all + } } return 0; diff --git a/cli-protonj2/src/main/java/com/redhat/mqe/CliProtonJ2Sender.java b/cli-protonj2/src/main/java/com/redhat/mqe/CliProtonJ2Sender.java index 6c160f61..3cd98669 100644 --- a/cli-protonj2/src/main/java/com/redhat/mqe/CliProtonJ2Sender.java +++ b/cli-protonj2/src/main/java/com/redhat/mqe/CliProtonJ2Sender.java @@ -54,6 +54,9 @@ public class CliProtonJ2Sender extends CliProtonJ2SenderReceiver implements Call @CommandLine.Option(names = {"--log-msgs"}, description = "message reporting style") private LogMsgs logMsgs = LogMsgs.dict; + @CommandLine.Option(names = {"--out"}, description = "MD5, SHA-1, SHA-256, ...") + private Out out = Out.python; + @CommandLine.Option(names = {"--msg-content-hashed"}) private String msgContentHashedString = "false"; @@ -131,7 +134,7 @@ public class CliProtonJ2Sender extends CliProtonJ2SenderReceiver implements Call private String msgUserId; @CommandLine.Option(names = {"--msg-priority"}) - private Byte msgPriority; + private Short msgPriority; // TODO unsigned byte, actually // jms.populateJMSXUserID opt in qpid-jms // TODO: does not seem to have equivalent; what is the threat model for "prevent spoofing" in JMS docs? @@ -259,17 +262,31 @@ public Integer call() throws Exception { // your business logic goes here... message.subject(msgSubject); } if (msgPriority != null) { - message.priority(msgPriority); + message.priority((byte) (int) msgPriority); } sender.send(message); // TODO what's timeout for in a sender? Map messageDict = messageFormatter.formatMessage(address, (Message) message, stringToBool(msgContentHashedString)); - switch (logMsgs) { - case dict: - messageFormatter.printMessageAsPython(messageDict); + switch(out) { + case python: + switch (logMsgs) { + case dict: + messageFormatter.printMessageAsPython(messageDict); + break; + case interop: + messageFormatter.printMessageAsPython(messageDict); + break; + } break; - case interop: - messageFormatter.printMessageAsJson(messageDict); + case json: + switch (logMsgs) { + case dict: + messageFormatter.printMessageAsJson(messageDict); + break; + case interop: + messageFormatter.printMessageAsJson(messageDict); + break; + } break; } } diff --git a/cli-protonj2/src/main/java/com/redhat/mqe/DurationMode.java b/cli-protonj2/src/main/java/com/redhat/mqe/DurationMode.java index bbc86659..96f3112f 100644 --- a/cli-protonj2/src/main/java/com/redhat/mqe/DurationMode.java +++ b/cli-protonj2/src/main/java/com/redhat/mqe/DurationMode.java @@ -20,7 +20,8 @@ package com.redhat.mqe; public enum DurationMode { - afterReceive("after-receive"); + afterReceive("after-receive"), + afterSendTxAction("after-send-tx-action"); private final String value; diff --git a/cli-protonj2/src/main/java/com/redhat/mqe/LogLib.java b/cli-protonj2/src/main/java/com/redhat/mqe/LogLib.java new file mode 100644 index 00000000..4a24001c --- /dev/null +++ b/cli-protonj2/src/main/java/com/redhat/mqe/LogLib.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2021 Red Hat, Inc. + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 + * + * http://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 com.redhat.mqe; + +public enum LogLib { + off, +} diff --git a/cli-protonj2/src/main/java/com/redhat/mqe/Main.java b/cli-protonj2/src/main/java/com/redhat/mqe/Main.java index 25a9def8..2d90eb7e 100644 --- a/cli-protonj2/src/main/java/com/redhat/mqe/Main.java +++ b/cli-protonj2/src/main/java/com/redhat/mqe/Main.java @@ -121,7 +121,7 @@ public Integer call() throws Exception { // your business logic goes here... } enum AuthMechanism { - PLAIN, + PLAIN, anonymous } // todo list of features in general; supports kerberos, io-uring, epoll, websockets, diff --git a/cli-protonj2/src/main/java/com/redhat/mqe/Out.java b/cli-protonj2/src/main/java/com/redhat/mqe/Out.java new file mode 100644 index 00000000..8f59bc5c --- /dev/null +++ b/cli-protonj2/src/main/java/com/redhat/mqe/Out.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2021 Red Hat, Inc. + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 + * + * http://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 com.redhat.mqe; + +public enum Out { + python, json +} From 88dad317a6ae574e6e4f90fda7f124dc41b36bb9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Oct 2021 16:34:14 +0200 Subject: [PATCH 030/435] Bump guava from 30.1.1-android to 31.0.1-android (#301) Bumps [guava](https://github.com/google/guava) from 30.1.1-android to 31.0.1-android. - [Release notes](https://github.com/google/guava/releases) - [Commits](https://github.com/google/guava/commits) --- updated-dependencies: - dependency-name: com.google.guava:guava dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cli-artemis-jms/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-artemis-jms/pom.xml b/cli-artemis-jms/pom.xml index 9c0d7db7..3fd02c5c 100644 --- a/cli-artemis-jms/pom.xml +++ b/cli-artemis-jms/pom.xml @@ -68,7 +68,7 @@ com.google.guava guava - 30.1.1-android + 31.0.1-android provided From 361a0459f90d5994a7681caafc0fee64ef252982 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Oct 2021 16:59:01 +0200 Subject: [PATCH 031/435] Bump tcnative.version from 2.0.41.Final to 2.0.44.Final (#303) Bumps `tcnative.version` from 2.0.41.Final to 2.0.44.Final. Updates `netty-tcnative-boringssl-static` from 2.0.41.Final to 2.0.44.Final - [Release notes](https://github.com/netty/netty-tcnative/releases) - [Commits](https://github.com/netty/netty-tcnative/compare/netty-tcnative-parent-2.0.41.Final...netty-tcnative-parent-2.0.44.Final) Updates `netty-tcnative` from 2.0.41.Final to 2.0.44.Final - [Release notes](https://github.com/netty/netty-tcnative/releases) - [Commits](https://github.com/netty/netty-tcnative/compare/netty-tcnative-parent-2.0.41.Final...netty-tcnative-parent-2.0.44.Final) --- updated-dependencies: - dependency-name: io.netty:netty-tcnative-boringssl-static dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.netty:netty-tcnative:linux-x86_64-fedora dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cli-qpid-jms/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-qpid-jms/pom.xml b/cli-qpid-jms/pom.xml index 04a8772d..a924639d 100644 --- a/cli-qpid-jms/pom.xml +++ b/cli-qpid-jms/pom.xml @@ -37,7 +37,7 @@ com.redhat.mqe.jms.Main 1.1.0 ${qpid.jms.client.version} - 2.0.41.Final + 2.0.44.Final linux-x86_64-fedora 1.6.0 From 4d434d502f0a83a6b48f9a3a57ecd4b3a1f25362 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Oct 2021 17:54:59 +0200 Subject: [PATCH 032/435] Bump kotlin.version from 1.5.30 to 1.5.31 (#298) Bumps `kotlin.version` from 1.5.30 to 1.5.31. Updates `kotlin-stdlib` from 1.5.30 to 1.5.31 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.31/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.30...v1.5.31) Updates `kotlin-stdlib-jdk8` from 1.5.30 to 1.5.31 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.31/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.30...v1.5.31) Updates `kotlin-test-junit` from 1.5.30 to 1.5.31 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.31/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.30...v1.5.31) Updates `kotlin-maven-plugin` from 1.5.30 to 1.5.31 Updates `kotlin-reflect` from 1.5.30 to 1.5.31 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.31/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.30...v1.5.31) --- updated-dependencies: - dependency-name: org.jetbrains.kotlin:kotlin-stdlib dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-stdlib-jdk8 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-test-junit dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-reflect dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 24a53a99..af562f0a 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -38,7 +38,7 @@ 2.37 2.12.5 - 1.5.30 + 1.5.31 5.7.2 1.4.2 1.1.3 From 87e93b70976b01cb3e8972bad8ffe7e85aa44e29 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Oct 2021 17:55:52 +0200 Subject: [PATCH 033/435] Bump artemis.broker.version from 2.18.0 to 2.19.0 (#305) Bumps `artemis.broker.version` from 2.18.0 to 2.19.0. Updates `artemis-amqp-protocol` from 2.18.0 to 2.19.0 Updates `artemis-server` from 2.18.0 to 2.19.0 - [Release notes](https://github.com/apache/activemq-artemis/releases) - [Commits](https://github.com/apache/activemq-artemis/compare/2.18.0...2.19.0) --- updated-dependencies: - dependency-name: org.apache.activemq:artemis-amqp-protocol dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.apache.activemq:artemis-server dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index af562f0a..3885f95d 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -45,7 +45,7 @@ 3.12.4 4.1.0 - 2.18.0 + 2.19.0 3.8.1 3.1.0 From 25fbe452ad026d35d1a93629f0008844b946663e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Oct 2021 18:31:45 +0200 Subject: [PATCH 034/435] Bump mockito-core from 3.12.4 to 4.0.0 (#307) Bumps [mockito-core](https://github.com/mockito/mockito) from 3.12.4 to 4.0.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v3.12.4...v4.0.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 3885f95d..d55c446c 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -42,7 +42,7 @@ 5.7.2 1.4.2 1.1.3 - 3.12.4 + 4.0.0 4.1.0 2.19.0 From cfc56010ed81d8ca26f6dc38c1afdcbd0417cfba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Oct 2021 18:44:59 +0200 Subject: [PATCH 035/435] Bump artemis.jms.client.version from 2.18.0 to 2.19.0 (#306) Bumps `artemis.jms.client.version` from 2.18.0 to 2.19.0. Updates `artemis-jms-client` from 2.18.0 to 2.19.0 - [Release notes](https://github.com/apache/activemq-artemis/releases) - [Commits](https://github.com/apache/activemq-artemis/compare/2.18.0...2.19.0) Updates `artemis-commons` from 2.18.0 to 2.19.0 - [Release notes](https://github.com/apache/activemq-artemis/releases) - [Commits](https://github.com/apache/activemq-artemis/compare/2.18.0...2.19.0) --- updated-dependencies: - dependency-name: org.apache.activemq:artemis-jms-client dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.apache.activemq:artemis-commons dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cli-artemis-jms/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-artemis-jms/pom.xml b/cli-artemis-jms/pom.xml index 3fd02c5c..05e1c1b7 100644 --- a/cli-artemis-jms/pom.xml +++ b/cli-artemis-jms/pom.xml @@ -36,7 +36,7 @@ acc com.redhat.mqe.acc.Main false - 2.18.0 + 2.19.0 ${artemis.jms.client.version} From 890f0d0e2d197128acb51b88ce589b95ee7a308d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Oct 2021 19:13:36 +0200 Subject: [PATCH 036/435] Bump checker-qual from 3.18.0 to 3.18.1 (#309) Bumps [checker-qual](https://github.com/typetools/checker-framework) from 3.18.0 to 3.18.1. - [Release notes](https://github.com/typetools/checker-framework/releases) - [Changelog](https://github.com/typetools/checker-framework/blob/master/docs/CHANGELOG.md) - [Commits](https://github.com/typetools/checker-framework/compare/checker-framework-3.18.0...checker-framework-3.18.1) --- updated-dependencies: - dependency-name: org.checkerframework:checker-qual dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index d55c446c..3e79e96c 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -57,7 +57,7 @@ 2.7 22.0.0 - 3.18.0 + 3.18.1 From 6c4301b641b808b46043d5e8ef1c2643399a306e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Oct 2021 19:56:00 +0200 Subject: [PATCH 037/435] Bump jackson-databind from 2.12.5 to 2.13.0 (#310) Bumps [jackson-databind](https://github.com/FasterXML/jackson) from 2.12.5 to 2.13.0. - [Release notes](https://github.com/FasterXML/jackson/releases) - [Commits](https://github.com/FasterXML/jackson/commits) --- updated-dependencies: - dependency-name: com.fasterxml.jackson.core:jackson-databind dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 3e79e96c..ab03e381 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -36,7 +36,7 @@ 1.7.32 5.0.4 2.37 - 2.12.5 + 2.13.0 1.5.31 5.7.2 From b199cc71d19f1d64932560bf4037c15dfe0fd62f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Oct 2021 06:55:40 +0200 Subject: [PATCH 038/435] Bump qpid-jms-parent from 1.1.0 to 1.2.0 (#308) Bumps qpid-jms-parent from 1.1.0 to 1.2.0. --- updated-dependencies: - dependency-name: org.apache.qpid:qpid-jms-parent dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cli-qpid-jms/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-qpid-jms/pom.xml b/cli-qpid-jms/pom.xml index a924639d..2df5152a 100644 --- a/cli-qpid-jms/pom.xml +++ b/cli-qpid-jms/pom.xml @@ -35,7 +35,7 @@ jms com.redhat.mqe.jms.Main - 1.1.0 + 1.2.0 ${qpid.jms.client.version} 2.0.44.Final linux-x86_64-fedora From 4613a0b457195486d39ecbc8595da3b13a5c7675 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Oct 2021 08:54:57 +0200 Subject: [PATCH 039/435] Bump junit-bom from 5.7.2 to 5.8.1 (#299) Bumps [junit-bom](https://github.com/junit-team/junit5) from 5.7.2 to 5.8.1. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.7.2...r5.8.1) --- updated-dependencies: - dependency-name: org.junit:junit-bom dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index ab03e381..ead4a6eb 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -39,7 +39,7 @@ 2.13.0 1.5.31 - 5.7.2 + 5.8.1 1.4.2 1.1.3 4.0.0 From 391a772f657896821ecd8433f894ed7bfa5c44c9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Oct 2021 23:16:24 +0200 Subject: [PATCH 040/435] Bump qpid-jms-parent from 1.2.0 to 1.3.0 (#311) Bumps qpid-jms-parent from 1.2.0 to 1.3.0. --- updated-dependencies: - dependency-name: org.apache.qpid:qpid-jms-parent dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cli-qpid-jms/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-qpid-jms/pom.xml b/cli-qpid-jms/pom.xml index 2df5152a..4167055e 100644 --- a/cli-qpid-jms/pom.xml +++ b/cli-qpid-jms/pom.xml @@ -35,7 +35,7 @@ jms com.redhat.mqe.jms.Main - 1.2.0 + 1.3.0 ${qpid.jms.client.version} 2.0.44.Final linux-x86_64-fedora From cf1559548c189296ab2c44caa0a0563e30fe860e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 24 Oct 2021 13:22:18 +0200 Subject: [PATCH 041/435] Bump dagger.version from 2.37 to 2.39.1 (#304) Bumps `dagger.version` from 2.37 to 2.39.1. Updates `dagger` from 2.37 to 2.39.1 - [Release notes](https://github.com/google/dagger/releases) - [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md) - [Commits](https://github.com/google/dagger/compare/dagger-2.37...dagger-2.39.1) Updates `dagger-compiler` from 2.37 to 2.39.1 - [Release notes](https://github.com/google/dagger/releases) - [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md) - [Commits](https://github.com/google/dagger/compare/dagger-2.37...dagger-2.39.1) --- updated-dependencies: - dependency-name: com.google.dagger:dagger dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: com.google.dagger:dagger-compiler dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index ead4a6eb..6f5d154d 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -35,7 +35,7 @@ 1.7.32 5.0.4 - 2.37 + 2.39.1 2.13.0 1.5.31 From a5d4264163b045628455388dea00ff779d2a5e3d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Oct 2021 14:11:53 +0200 Subject: [PATCH 042/435] Bump protonj2-client from 1.0.0-M2 to 1.0.0-M3 (#312) Bumps protonj2-client from 1.0.0-M2 to 1.0.0-M3. --- updated-dependencies: - dependency-name: org.apache.qpid:protonj2-client dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cli-protonj2/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-protonj2/pom.xml b/cli-protonj2/pom.xml index ae038343..a4f345c2 100644 --- a/cli-protonj2/pom.xml +++ b/cli-protonj2/pom.xml @@ -34,7 +34,7 @@ jms - 1.0.0-M2 + 1.0.0-M3 com.redhat.mqe.Main ${protonj2.version} 2.0.39.Final From 70d6866d736ea4ac31a38101abc7c25072a001d5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Oct 2021 23:32:04 +0200 Subject: [PATCH 043/435] Bump dagger.version from 2.39.1 to 2.40 (#314) Bumps `dagger.version` from 2.39.1 to 2.40. Updates `dagger` from 2.39.1 to 2.40 - [Release notes](https://github.com/google/dagger/releases) - [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md) - [Commits](https://github.com/google/dagger/compare/dagger-2.39.1...dagger-2.40) Updates `dagger-compiler` from 2.39.1 to 2.40 - [Release notes](https://github.com/google/dagger/releases) - [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md) - [Commits](https://github.com/google/dagger/compare/dagger-2.39.1...dagger-2.40) --- updated-dependencies: - dependency-name: com.google.dagger:dagger dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: com.google.dagger:dagger-compiler dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 6f5d154d..b042e514 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -35,7 +35,7 @@ 1.7.32 5.0.4 - 2.39.1 + 2.40 2.13.0 1.5.31 From b5e211f08b5c6eef50b2f30e9c0481e1eb0fde44 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Oct 2021 21:36:30 +0000 Subject: [PATCH 044/435] Bump awaitility from 4.1.0 to 4.1.1 (#313) Bumps [awaitility](https://github.com/awaitility/awaitility) from 4.1.0 to 4.1.1. - [Release notes](https://github.com/awaitility/awaitility/releases) - [Changelog](https://github.com/awaitility/awaitility/blob/master/changelog.txt) - [Commits](https://github.com/awaitility/awaitility/compare/awaitility-4.1.0...awaitility-4.1.1) --- updated-dependencies: - dependency-name: org.awaitility:awaitility dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index b042e514..b3601df6 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -43,7 +43,7 @@ 1.4.2 1.1.3 4.0.0 - 4.1.0 + 4.1.1 2.19.0 From 954e70c222a11932a76060d65e86e2ae44f4079e Mon Sep 17 00:00:00 2001 From: Jiri Danek Date: Wed, 1 Sep 2021 10:18:21 +0200 Subject: [PATCH 045/435] Add additional options to cli-protonj2 --- .../com/redhat/mqe/CliProtonJ2Sender.java | 2 +- .../src/main/java/com/redhat/mqe/Main.java | 69 +++++++++++++++++++ 2 files changed, 70 insertions(+), 1 deletion(-) diff --git a/cli-protonj2/src/main/java/com/redhat/mqe/CliProtonJ2Sender.java b/cli-protonj2/src/main/java/com/redhat/mqe/CliProtonJ2Sender.java index 3cd98669..a786c08c 100644 --- a/cli-protonj2/src/main/java/com/redhat/mqe/CliProtonJ2Sender.java +++ b/cli-protonj2/src/main/java/com/redhat/mqe/CliProtonJ2Sender.java @@ -162,7 +162,7 @@ public CliProtonJ2Sender(ProtonJ2MessageFormatter messageFormatter) { public Integer call() throws Exception { // your business logic goes here... String prefix = ""; - if (!broker.startsWith("amqp://") && !broker.startsWith("amqps://")) { + if (!broker.startsWith("amqp://") || !broker.startsWith("amqps://")) { prefix = "amqp://"; } final URI url = new URI(prefix + broker); diff --git a/cli-protonj2/src/main/java/com/redhat/mqe/Main.java b/cli-protonj2/src/main/java/com/redhat/mqe/Main.java index 2d90eb7e..502c1135 100644 --- a/cli-protonj2/src/main/java/com/redhat/mqe/Main.java +++ b/cli-protonj2/src/main/java/com/redhat/mqe/Main.java @@ -128,3 +128,72 @@ enum AuthMechanism { // does it support opening listening sockets? listening websocket? // does support all JMS 2.0 capabilities? (in some way, assuming broker cooperates?) + // TODO: API question: what is difference between autoSettle and autoAccept? why I want one but not the other? + if(ssnAckMode != null) { + if (ssnAckMode == SsnAckMode.client) { + receiverOptions.autoAccept(false); + receiverOptions.autoSettle(false); + } + } + + try (Connection connection = client.connect(serverHost, serverPort, options)) { + Receiver receiver; + if (stringToBool(durableSubscriberString)) { + receiver = connection.openDurableReceiver(address, durableSubscriberName, receiverOptions); + } else { + receiver = connection.openReceiver(address, receiverOptions); + } + + double initialTimestamp = Utils.getTime(); + for (int i = 0; i < count; i++) { + +// if (durationMode == DurationMode.sleepBeforeReceive) { +// LOG.trace("Sleeping before receive"); +// Utils.sleepUntilNextIteration(initialTimestamp, msgCount, duration, i + 1); +// } + + final Delivery delivery; + if (timeout == 0) { + delivery = receiver.receive(); // todo: can default it to -1 + } else { + delivery = receiver.receive(timeout, TimeUnit.SECONDS); + } + + if (delivery == null) { + break; + } + + if (durationMode == DurationMode.afterReceive) { +// LOG.trace("Sleeping after receive"); + Utils.sleepUntilNextIteration(initialTimestamp, count, duration, i + 1); // todo possibly it is i, different loop here + } + + if (processReplyTo && delivery.message().replyTo() != null) { + String replyTo = delivery.message().replyTo(); + Message message = delivery.message(); + message.replyTo(null); + try (Sender sender = connection.openSender(replyTo)) { + sender.send(message); + } + } + + int messageFormat = delivery.messageFormat(); + Message message = delivery.message(); + + // todo, is this what we mean? + if (ssnAckMode != null && ssnAckMode == SsnAckMode.client) { + delivery.accept(); + } + + logMessage(address, message, stringToBool(msgContentHashedString)); + } + + // TODO API usability, how do I do durable subscription with detach, resume, etc; no mention of unsubscribe in the client anywhere + receiver.close(); // TODO want to do autoclosable, need helper func, that's all +// receiver.detach(); + } + + return 0; + } + +} From 929adcaa50af1c2038cb421ee953ec3045fba996 Mon Sep 17 00:00:00 2001 From: Jiri Danek Date: Wed, 1 Sep 2021 14:09:33 +0200 Subject: [PATCH 046/435] Plug cli-protonj2 into selftests --- .../com/redhat/mqe/CliProtonJ2Sender.java | 2 +- .../src/main/java/com/redhat/mqe/Main.java | 69 ------------------- 2 files changed, 1 insertion(+), 70 deletions(-) diff --git a/cli-protonj2/src/main/java/com/redhat/mqe/CliProtonJ2Sender.java b/cli-protonj2/src/main/java/com/redhat/mqe/CliProtonJ2Sender.java index a786c08c..3cd98669 100644 --- a/cli-protonj2/src/main/java/com/redhat/mqe/CliProtonJ2Sender.java +++ b/cli-protonj2/src/main/java/com/redhat/mqe/CliProtonJ2Sender.java @@ -162,7 +162,7 @@ public CliProtonJ2Sender(ProtonJ2MessageFormatter messageFormatter) { public Integer call() throws Exception { // your business logic goes here... String prefix = ""; - if (!broker.startsWith("amqp://") || !broker.startsWith("amqps://")) { + if (!broker.startsWith("amqp://") && !broker.startsWith("amqps://")) { prefix = "amqp://"; } final URI url = new URI(prefix + broker); diff --git a/cli-protonj2/src/main/java/com/redhat/mqe/Main.java b/cli-protonj2/src/main/java/com/redhat/mqe/Main.java index 502c1135..2d90eb7e 100644 --- a/cli-protonj2/src/main/java/com/redhat/mqe/Main.java +++ b/cli-protonj2/src/main/java/com/redhat/mqe/Main.java @@ -128,72 +128,3 @@ enum AuthMechanism { // does it support opening listening sockets? listening websocket? // does support all JMS 2.0 capabilities? (in some way, assuming broker cooperates?) - // TODO: API question: what is difference between autoSettle and autoAccept? why I want one but not the other? - if(ssnAckMode != null) { - if (ssnAckMode == SsnAckMode.client) { - receiverOptions.autoAccept(false); - receiverOptions.autoSettle(false); - } - } - - try (Connection connection = client.connect(serverHost, serverPort, options)) { - Receiver receiver; - if (stringToBool(durableSubscriberString)) { - receiver = connection.openDurableReceiver(address, durableSubscriberName, receiverOptions); - } else { - receiver = connection.openReceiver(address, receiverOptions); - } - - double initialTimestamp = Utils.getTime(); - for (int i = 0; i < count; i++) { - -// if (durationMode == DurationMode.sleepBeforeReceive) { -// LOG.trace("Sleeping before receive"); -// Utils.sleepUntilNextIteration(initialTimestamp, msgCount, duration, i + 1); -// } - - final Delivery delivery; - if (timeout == 0) { - delivery = receiver.receive(); // todo: can default it to -1 - } else { - delivery = receiver.receive(timeout, TimeUnit.SECONDS); - } - - if (delivery == null) { - break; - } - - if (durationMode == DurationMode.afterReceive) { -// LOG.trace("Sleeping after receive"); - Utils.sleepUntilNextIteration(initialTimestamp, count, duration, i + 1); // todo possibly it is i, different loop here - } - - if (processReplyTo && delivery.message().replyTo() != null) { - String replyTo = delivery.message().replyTo(); - Message message = delivery.message(); - message.replyTo(null); - try (Sender sender = connection.openSender(replyTo)) { - sender.send(message); - } - } - - int messageFormat = delivery.messageFormat(); - Message message = delivery.message(); - - // todo, is this what we mean? - if (ssnAckMode != null && ssnAckMode == SsnAckMode.client) { - delivery.accept(); - } - - logMessage(address, message, stringToBool(msgContentHashedString)); - } - - // TODO API usability, how do I do durable subscription with detach, resume, etc; no mention of unsubscribe in the client anywhere - receiver.close(); // TODO want to do autoclosable, need helper func, that's all -// receiver.detach(); - } - - return 0; - } - -} From cee6554aad18badee20f54a463fa01f51c586cf4 Mon Sep 17 00:00:00 2001 From: Jiri Danek Date: Mon, 18 Oct 2021 16:03:14 +0200 Subject: [PATCH 047/435] Add more sender options (unimplemented for now) --- .../com/redhat/mqe/CliProtonJ2Sender.java | 15 ++++++++++++ .../main/java/com/redhat/mqe/SyncMode.java | 24 +++++++++++++++++++ .../main/java/com/redhat/mqe/TxAction.java | 24 +++++++++++++++++++ .../java/com/redhat/mqe/TxEndloopAction.java | 24 +++++++++++++++++++ 4 files changed, 87 insertions(+) create mode 100644 cli-protonj2/src/main/java/com/redhat/mqe/SyncMode.java create mode 100644 cli-protonj2/src/main/java/com/redhat/mqe/TxAction.java create mode 100644 cli-protonj2/src/main/java/com/redhat/mqe/TxEndloopAction.java diff --git a/cli-protonj2/src/main/java/com/redhat/mqe/CliProtonJ2Sender.java b/cli-protonj2/src/main/java/com/redhat/mqe/CliProtonJ2Sender.java index 3cd98669..06524df6 100644 --- a/cli-protonj2/src/main/java/com/redhat/mqe/CliProtonJ2Sender.java +++ b/cli-protonj2/src/main/java/com/redhat/mqe/CliProtonJ2Sender.java @@ -150,6 +150,21 @@ public class CliProtonJ2Sender extends CliProtonJ2SenderReceiver implements Call @CommandLine.Option(names = {"--ssn-ack-mode"}) private SsnAckMode ssnAckMode; + @CommandLine.Option(names = {"--tx-endloop-action"}) + private TxEndloopAction txEndloopAction; + + @CommandLine.Option(names = {"--tx-action"}) + private TxAction txAction; + + @CommandLine.Option(names = {"--sync-mode"}) + private SyncMode syncMode; + + @CommandLine.Option(names = {"--log-lib"}) + private LogLib logLib; + + @CommandLine.Option(names = {"--duration-mode"}) + private DurationMode durationMode; + public CliProtonJ2Sender() { this.messageFormatter = new ProtonJ2MessageFormatter(); } diff --git a/cli-protonj2/src/main/java/com/redhat/mqe/SyncMode.java b/cli-protonj2/src/main/java/com/redhat/mqe/SyncMode.java new file mode 100644 index 00000000..c845afea --- /dev/null +++ b/cli-protonj2/src/main/java/com/redhat/mqe/SyncMode.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2021 Red Hat, Inc. + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 + * + * http://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 com.redhat.mqe; + +public enum SyncMode { + session, +} diff --git a/cli-protonj2/src/main/java/com/redhat/mqe/TxAction.java b/cli-protonj2/src/main/java/com/redhat/mqe/TxAction.java new file mode 100644 index 00000000..3e98c415 --- /dev/null +++ b/cli-protonj2/src/main/java/com/redhat/mqe/TxAction.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2021 Red Hat, Inc. + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 + * + * http://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 com.redhat.mqe; + +public enum TxAction { + recover +} diff --git a/cli-protonj2/src/main/java/com/redhat/mqe/TxEndloopAction.java b/cli-protonj2/src/main/java/com/redhat/mqe/TxEndloopAction.java new file mode 100644 index 00000000..8d66ac88 --- /dev/null +++ b/cli-protonj2/src/main/java/com/redhat/mqe/TxEndloopAction.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2021 Red Hat, Inc. + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 + * + * http://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 com.redhat.mqe; + +public enum TxEndloopAction { + recover, +} From da260ee8050a6149bb5646d3b1b73c575c750620 Mon Sep 17 00:00:00 2001 From: Jiri Danek Date: Fri, 29 Oct 2021 16:26:27 +0200 Subject: [PATCH 048/435] Migrate .travis.yml script fully into GHA --- .github/workflows/maven.yml | 28 ++++++++++++++++++++++++++++ .travis.yml | 29 ----------------------------- tests.sh | 2 -- 3 files changed, 28 insertions(+), 31 deletions(-) delete mode 100644 .travis.yml diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 0b4f20e9..a7f3c8a7 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -31,3 +31,31 @@ jobs: - name: Run a single test (remember that JUnit5 issue) run: mvn surefire:test -Dtest=QPIDJMS484Test -pl :cli-qpid-jms + + test: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + distribution: 'adopt-openj9' + java-version: '11' + + - name: docker pull + run: docker pull quay.io/jdanek/docker-alpine-openjdk-artemis-snapshot:latest + + - name: docker run + run: docker run --rm -v`pwd`/scripts:/mnt -p 1883:1883 -p 5672:5672 -p 61616:61616 -p 5673:5673 -p 61617:61617 --entrypoint bash quay.io/jdanek/docker-alpine-openjdk-artemis-snapshot:latest /mnt/entrypoint.sh amq7-server & + + - name: sleep + run: sleep 10 + + - name: mvn package + run: mvn clean package -Ptests,coverage + + - name: bash ./tests.sh + run: bash ./tests.sh diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2186c97e..00000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -sudo: false -language: java -# oraclejdk8 is not available on releases after trusty -# https://travis-ci.community/t/install-of-oracle-jdk-8-failing/3038/8 -dist: trusty -jdk: - - openjdk8 - - oraclejdk8 - - openjdk11 - - oraclejdk11 - -services: - - docker - -env: - global: - # CC_TEST_REPORTER_ID - secure: "apzhT0ZU5sIR/ndjCtnHmzfmJePOXle0DD8Y4a9kTvFPidk8/RET4+YmWhE1ij4GOActLpbEwivA2wrM/YyxbRTRY4dZro0iK+O0DvPYQTsiI/fYe4chNOSO0+IQ1MA/KJbJgeZKgBCM/uXNw2Evb+KwBqeN72Lx1K9/uK8VkI2aiqbw9W3gEcshVMWthTFiPSSZfqU14y9KHP8HoEZvGed7kFJFslsfqwgVRMP4cnrff3CEmQNardjY/aWgVKzuqMVEvnw2ER6K0ULYoQyUdqqngvaqv7bEtQLkwdiVbbphVRyTfUkHtqbStp4vasegzDiEf7RhatqPNLCxb5V/jJFa6/pMccvDESwefLJW7ZqBObdUjk4pHbrQoY+psCs5Rs6Y9p/hA6jomZKO3ipHF/kSnKDcLCueR9UMh0/JTkbbr4cNAnxwOjX3btCCKeqSxD/0BjLWUINrMfCuXBBt29EOs02wLlURtv5HZrPzrHFnqXy4lja3JOzhiqLjTURnFwzT0gysKWGMKx4PPiZr/BY35pX/Z9InRhlXyuh8pQ3BJnJ4y8OXh/IISB4R9YfiTm42UlhGJUT7w/NR8uwgUBiTu/QgNf5FoZrH4QMsbNPchKFzhpB8ucp6V9Chjg7+86i3/BHmQM65r7H9mP9iGaYXOTRiJCKDetbrMa1W8Cs=" - -script: - # https://docs.travis-ci.com/user/docker/ - - docker pull quay.io/jdanek/docker-alpine-openjdk-artemis-snapshot:latest - - docker run --rm -v`pwd`/scripts:/mnt -p 1883:1883 -p 5672:5672 -p 61616:61616 -p 5673:5673 -p 61617:61617 --entrypoint bash quay.io/jdanek/docker-alpine-openjdk-artemis-snapshot:latest /mnt/entrypoint.sh amq7-server & - - sleep 10 - - mvn clean package -Ptests,coverage - - bash ./tests.sh - -after_success: - - bash <(curl -s https://codecov.io/bash) diff --git a/tests.sh b/tests.sh index 8f4d1d07..3815ab0f 100644 --- a/tests.sh +++ b/tests.sh @@ -31,8 +31,6 @@ java -jar cli-artemis-jms/target/cli-artemis-jms-1.2.2-SNAPSHOT-*.jar sender --c java -jar cli-paho-java/target/cli-paho-java-1.2.2-SNAPSHOT-*.jar sender --address cli-paho-java --log-msgs json --count 1 -if [[ $TRAVIS_JDK_VERSION == "openjdk8" ]] || [[ $TRAVIS_JDK_VERSION == "oraclejdk8" ]]; then exit 0; fi - cli_qpid_jms_jar=$(find cli-qpid-jms/target -name 'cli-qpid-jms-1.2.2-SNAPSHOT-*.jar' -not -name '*-tests.jar') java -jar ${cli_qpid_jms_jar} sender --address cli-qpid-jms --log-msgs json --count 1 java -jar ${cli_qpid_jms_jar} receiver --address cli-qpid-jms --log-msgs json --count 1 From 9d9f5513d3a91444350e58b7908cd02e5210f1ea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Nov 2021 21:04:31 +0000 Subject: [PATCH 049/435] Bump tcnative.version from 2.0.44.Final to 2.0.45.Final Bumps `tcnative.version` from 2.0.44.Final to 2.0.45.Final. Updates `netty-tcnative-boringssl-static` from 2.0.44.Final to 2.0.45.Final - [Release notes](https://github.com/netty/netty-tcnative/releases) - [Commits](https://github.com/netty/netty-tcnative/compare/netty-tcnative-parent-2.0.44.Final...netty-tcnative-parent-2.0.45.Final) Updates `netty-tcnative` from 2.0.44.Final to 2.0.45.Final - [Release notes](https://github.com/netty/netty-tcnative/releases) - [Commits](https://github.com/netty/netty-tcnative/compare/netty-tcnative-parent-2.0.44.Final...netty-tcnative-parent-2.0.45.Final) --- updated-dependencies: - dependency-name: io.netty:netty-tcnative-boringssl-static dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.netty:netty-tcnative:linux-x86_64-fedora dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- cli-qpid-jms/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-qpid-jms/pom.xml b/cli-qpid-jms/pom.xml index 4167055e..dac96f15 100644 --- a/cli-qpid-jms/pom.xml +++ b/cli-qpid-jms/pom.xml @@ -37,7 +37,7 @@ com.redhat.mqe.jms.Main 1.3.0 ${qpid.jms.client.version} - 2.0.44.Final + 2.0.45.Final linux-x86_64-fedora 1.6.0 From 1dc768b75148182ee23dd72063b47f3665313e8c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Nov 2021 21:35:05 +0000 Subject: [PATCH 050/435] Bump checker-qual from 3.18.1 to 3.19.0 Bumps [checker-qual](https://github.com/typetools/checker-framework) from 3.18.1 to 3.19.0. - [Release notes](https://github.com/typetools/checker-framework/releases) - [Changelog](https://github.com/typetools/checker-framework/blob/master/docs/CHANGELOG.md) - [Commits](https://github.com/typetools/checker-framework/compare/checker-framework-3.18.1...checker-framework-3.19.0) --- updated-dependencies: - dependency-name: org.checkerframework:checker-qual dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index b3601df6..10d4dd74 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -57,7 +57,7 @@ 2.7 22.0.0 - 3.18.1 + 3.19.0 From c65a27089c5913f678ea5da1146afb85043c19ec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Nov 2021 21:09:14 +0000 Subject: [PATCH 051/435] Bump picocli from 4.6.1 to 4.6.2 Bumps [picocli](https://github.com/remkop/picocli) from 4.6.1 to 4.6.2. - [Release notes](https://github.com/remkop/picocli/releases) - [Changelog](https://github.com/remkop/picocli/blob/master/RELEASE-NOTES.md) - [Commits](https://github.com/remkop/picocli/compare/v4.6.1...v4.6.2) --- updated-dependencies: - dependency-name: info.picocli:picocli dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- cli-protonj2/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-protonj2/pom.xml b/cli-protonj2/pom.xml index a4f345c2..4cfad614 100644 --- a/cli-protonj2/pom.xml +++ b/cli-protonj2/pom.xml @@ -87,7 +87,7 @@ info.picocli picocli - 4.6.1 + 4.6.2 From 32fd47494942616a2222084b5d76a38eb99c4771 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Nov 2021 21:08:58 +0000 Subject: [PATCH 052/435] Bump annotations from 22.0.0 to 23.0.0 Bumps [annotations](https://github.com/JetBrains/java-annotations) from 22.0.0 to 23.0.0. - [Release notes](https://github.com/JetBrains/java-annotations/releases) - [Changelog](https://github.com/JetBrains/java-annotations/blob/master/CHANGELOG.md) - [Commits](https://github.com/JetBrains/java-annotations/compare/22.0.0...23.0.0) --- updated-dependencies: - dependency-name: org.jetbrains:annotations dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 10d4dd74..0555345f 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -56,7 +56,7 @@ 3.0.0-M5 2.7 - 22.0.0 + 23.0.0 3.19.0 From 08b283676aabfa815fa39cc49146618f8e92d560 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Nov 2021 21:08:16 +0000 Subject: [PATCH 053/435] Bump dagger.version from 2.40 to 2.40.1 Bumps `dagger.version` from 2.40 to 2.40.1. Updates `dagger` from 2.40 to 2.40.1 - [Release notes](https://github.com/google/dagger/releases) - [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md) - [Commits](https://github.com/google/dagger/compare/dagger-2.40...dagger-2.40.1) Updates `dagger-compiler` from 2.40 to 2.40.1 - [Release notes](https://github.com/google/dagger/releases) - [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md) - [Commits](https://github.com/google/dagger/compare/dagger-2.40...dagger-2.40.1) --- updated-dependencies: - dependency-name: com.google.dagger:dagger dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: com.google.dagger:dagger-compiler dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 0555345f..a158141e 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -35,7 +35,7 @@ 1.7.32 5.0.4 - 2.40 + 2.40.1 2.13.0 1.5.31 From ac489b4093ba2595b7150461522fd1590088a879 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Nov 2021 21:13:53 +0000 Subject: [PATCH 054/435] Bump kotlin.version from 1.5.31 to 1.6.0 Bumps `kotlin.version` from 1.5.31 to 1.6.0. Updates `kotlin-stdlib` from 1.5.31 to 1.6.0 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/commits) Updates `kotlin-stdlib-jdk8` from 1.5.31 to 1.6.0 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/commits) Updates `kotlin-test-junit` from 1.5.31 to 1.6.0 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/commits) Updates `kotlin-maven-plugin` from 1.5.31 to 1.6.0 Updates `kotlin-reflect` from 1.5.31 to 1.6.0 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/commits) --- updated-dependencies: - dependency-name: org.jetbrains.kotlin:kotlin-stdlib dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.jetbrains.kotlin:kotlin-stdlib-jdk8 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.jetbrains.kotlin:kotlin-test-junit dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.jetbrains.kotlin:kotlin-maven-plugin dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.jetbrains.kotlin:kotlin-reflect dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index a158141e..05cf5bcd 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -38,7 +38,7 @@ 2.40.1 2.13.0 - 1.5.31 + 1.6.0 5.8.1 1.4.2 1.1.3 From c0b39d0b6e44688a814d51484c884cd06f2e9fc6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Nov 2021 21:32:15 +0000 Subject: [PATCH 055/435] Bump junit-pioneer from 1.4.2 to 1.5.0 Bumps [junit-pioneer](https://github.com/junit-pioneer/junit-pioneer) from 1.4.2 to 1.5.0. - [Release notes](https://github.com/junit-pioneer/junit-pioneer/releases) - [Commits](https://github.com/junit-pioneer/junit-pioneer/compare/v1.4.2...v1.5.0) --- updated-dependencies: - dependency-name: org.junit-pioneer:junit-pioneer dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 05cf5bcd..45159e39 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -40,7 +40,7 @@ 1.6.0 5.8.1 - 1.4.2 + 1.5.0 1.1.3 4.0.0 4.1.1 From 2995ea534fb04a9cf6a3e8a3f8bac55609a87dfe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Nov 2021 21:02:28 +0000 Subject: [PATCH 056/435] Bump tcnative.version from 2.0.45.Final to 2.0.46.Final Bumps `tcnative.version` from 2.0.45.Final to 2.0.46.Final. Updates `netty-tcnative-boringssl-static` from 2.0.45.Final to 2.0.46.Final - [Release notes](https://github.com/netty/netty-tcnative/releases) - [Commits](https://github.com/netty/netty-tcnative/compare/netty-tcnative-parent-2.0.45.Final...netty-tcnative-parent-2.0.46.Final) Updates `netty-tcnative` from 2.0.45.Final to 2.0.46.Final - [Release notes](https://github.com/netty/netty-tcnative/releases) - [Commits](https://github.com/netty/netty-tcnative/compare/netty-tcnative-parent-2.0.45.Final...netty-tcnative-parent-2.0.46.Final) --- updated-dependencies: - dependency-name: io.netty:netty-tcnative-boringssl-static dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.netty:netty-tcnative:linux-x86_64-fedora dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- cli-qpid-jms/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-qpid-jms/pom.xml b/cli-qpid-jms/pom.xml index dac96f15..c44e214e 100644 --- a/cli-qpid-jms/pom.xml +++ b/cli-qpid-jms/pom.xml @@ -37,7 +37,7 @@ com.redhat.mqe.jms.Main 1.3.0 ${qpid.jms.client.version} - 2.0.45.Final + 2.0.46.Final linux-x86_64-fedora 1.6.0 From 4a307308f50ed7925ac0d7387c7f2f14ae42ae6b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Nov 2021 21:05:36 +0000 Subject: [PATCH 057/435] Bump mockito-core from 4.0.0 to 4.1.0 Bumps [mockito-core](https://github.com/mockito/mockito) from 4.0.0 to 4.1.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v4.0.0...v4.1.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 45159e39..89e4bf2f 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -42,7 +42,7 @@ 5.8.1 1.5.0 1.1.3 - 4.0.0 + 4.1.0 4.1.1 2.19.0 From 9951596e1ce6abd7fae57cba6107298b9cb0a8d0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Dec 2021 21:05:30 +0000 Subject: [PATCH 058/435] Bump dagger.version from 2.40.1 to 2.40.4 Bumps `dagger.version` from 2.40.1 to 2.40.4. Updates `dagger` from 2.40.1 to 2.40.4 - [Release notes](https://github.com/google/dagger/releases) - [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md) - [Commits](https://github.com/google/dagger/compare/dagger-2.40.1...dagger-2.40.4) Updates `dagger-compiler` from 2.40.1 to 2.40.4 - [Release notes](https://github.com/google/dagger/releases) - [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md) - [Commits](https://github.com/google/dagger/compare/dagger-2.40.1...dagger-2.40.4) --- updated-dependencies: - dependency-name: com.google.dagger:dagger dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: com.google.dagger:dagger-compiler dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 89e4bf2f..28acebf7 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -35,7 +35,7 @@ 1.7.32 5.0.4 - 2.40.1 + 2.40.4 2.13.0 1.6.0 From f88c34b443d9ab251cfa4ef4e9b72741a00d653f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Dec 2021 21:44:34 +0000 Subject: [PATCH 059/435] Bump junit-bom from 5.8.1 to 5.8.2 Bumps [junit-bom](https://github.com/junit-team/junit5) from 5.8.1 to 5.8.2. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.8.1...r5.8.2) --- updated-dependencies: - dependency-name: org.junit:junit-bom dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 28acebf7..85b8d219 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -39,7 +39,7 @@ 2.13.0 1.6.0 - 5.8.1 + 5.8.2 1.5.0 1.1.3 4.1.0 From 96f8ed43351cc1a62a42f4745e72994a5ac3b84b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Dec 2021 00:13:30 +0000 Subject: [PATCH 060/435] Bump dagger.version from 2.40.4 to 2.40.5 Bumps `dagger.version` from 2.40.4 to 2.40.5. Updates `dagger` from 2.40.4 to 2.40.5 - [Release notes](https://github.com/google/dagger/releases) - [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md) - [Commits](https://github.com/google/dagger/compare/dagger-2.40.4...dagger-2.40.5) Updates `dagger-compiler` from 2.40.4 to 2.40.5 - [Release notes](https://github.com/google/dagger/releases) - [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md) - [Commits](https://github.com/google/dagger/compare/dagger-2.40.4...dagger-2.40.5) --- updated-dependencies: - dependency-name: com.google.dagger:dagger dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: com.google.dagger:dagger-compiler dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 85b8d219..6cfdc86a 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -35,7 +35,7 @@ 1.7.32 5.0.4 - 2.40.4 + 2.40.5 2.13.0 1.6.0 From e98c95cdc63b5eadc95595fad06093446fe05144 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Dec 2021 07:23:14 +0000 Subject: [PATCH 061/435] Bump checker-qual from 3.19.0 to 3.20.0 Bumps [checker-qual](https://github.com/typetools/checker-framework) from 3.19.0 to 3.20.0. - [Release notes](https://github.com/typetools/checker-framework/releases) - [Changelog](https://github.com/typetools/checker-framework/blob/master/docs/CHANGELOG.md) - [Commits](https://github.com/typetools/checker-framework/compare/checker-framework-3.19.0...checker-framework-3.20.0) --- updated-dependencies: - dependency-name: org.checkerframework:checker-qual dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 6cfdc86a..b34dec96 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -57,7 +57,7 @@ 2.7 23.0.0 - 3.19.0 + 3.20.0 From 82286b0ceb1746a4873fa3fe16e8081ceab0c33d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Dec 2021 21:09:16 +0000 Subject: [PATCH 062/435] Bump qpid-jms-parent from 1.3.0 to 1.4.1 Bumps qpid-jms-parent from 1.3.0 to 1.4.1. --- updated-dependencies: - dependency-name: org.apache.qpid:qpid-jms-parent dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- cli-qpid-jms/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-qpid-jms/pom.xml b/cli-qpid-jms/pom.xml index c44e214e..f33b090d 100644 --- a/cli-qpid-jms/pom.xml +++ b/cli-qpid-jms/pom.xml @@ -35,7 +35,7 @@ jms com.redhat.mqe.jms.Main - 1.3.0 + 1.4.1 ${qpid.jms.client.version} 2.0.46.Final linux-x86_64-fedora From 61519d2de7fb69b9402c4dbee88076abc8ac0bbe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Dec 2021 15:44:06 +0000 Subject: [PATCH 063/435] Bump mockito-core from 4.1.0 to 4.2.0 Bumps [mockito-core](https://github.com/mockito/mockito) from 4.1.0 to 4.2.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v4.1.0...v4.2.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index b34dec96..f8d515a5 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -42,7 +42,7 @@ 5.8.2 1.5.0 1.1.3 - 4.1.0 + 4.2.0 4.1.1 2.19.0 From db5552e27a34e3db53691f18707415a85421c03a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Dec 2021 15:47:54 +0000 Subject: [PATCH 064/435] Bump kotlin.version from 1.6.0 to 1.6.10 Bumps `kotlin.version` from 1.6.0 to 1.6.10. Updates `kotlin-stdlib` from 1.6.0 to 1.6.10 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/v1.6.10/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/compare/v1.6.0...v1.6.10) Updates `kotlin-stdlib-jdk8` from 1.6.0 to 1.6.10 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/v1.6.10/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/compare/v1.6.0...v1.6.10) Updates `kotlin-test-junit` from 1.6.0 to 1.6.10 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/v1.6.10/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/compare/v1.6.0...v1.6.10) Updates `kotlin-maven-plugin` from 1.6.0 to 1.6.10 Updates `kotlin-reflect` from 1.6.0 to 1.6.10 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/v1.6.10/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/compare/v1.6.0...v1.6.10) --- updated-dependencies: - dependency-name: org.jetbrains.kotlin:kotlin-stdlib dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-stdlib-jdk8 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-test-junit dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-reflect dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index f8d515a5..5c77f140 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -38,7 +38,7 @@ 2.40.5 2.13.0 - 1.6.0 + 1.6.10 5.8.2 1.5.0 1.1.3 From af6cf73fce9b689c50b598e5469e70d906ea7cdc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Dec 2021 21:06:51 +0000 Subject: [PATCH 065/435] Bump artemis.jms.client.version from 2.19.0 to 2.20.0 Bumps `artemis.jms.client.version` from 2.19.0 to 2.20.0. Updates `artemis-jms-client` from 2.19.0 to 2.20.0 - [Release notes](https://github.com/apache/activemq-artemis/releases) - [Commits](https://github.com/apache/activemq-artemis/compare/2.19.0...2.20.0) Updates `artemis-commons` from 2.19.0 to 2.20.0 - [Release notes](https://github.com/apache/activemq-artemis/releases) - [Commits](https://github.com/apache/activemq-artemis/compare/2.19.0...2.20.0) --- updated-dependencies: - dependency-name: org.apache.activemq:artemis-jms-client dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.apache.activemq:artemis-commons dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- cli-artemis-jms/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-artemis-jms/pom.xml b/cli-artemis-jms/pom.xml index 05e1c1b7..6e953967 100644 --- a/cli-artemis-jms/pom.xml +++ b/cli-artemis-jms/pom.xml @@ -36,7 +36,7 @@ acc com.redhat.mqe.acc.Main false - 2.19.0 + 2.20.0 ${artemis.jms.client.version} From b0c62c8da523a0fb41971a004ea4150ed82bd75c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Dec 2021 21:12:35 +0000 Subject: [PATCH 066/435] Bump checker-qual from 3.20.0 to 3.21.0 Bumps [checker-qual](https://github.com/typetools/checker-framework) from 3.20.0 to 3.21.0. - [Release notes](https://github.com/typetools/checker-framework/releases) - [Changelog](https://github.com/typetools/checker-framework/blob/master/docs/CHANGELOG.md) - [Commits](https://github.com/typetools/checker-framework/compare/checker-framework-3.20.0...checker-framework-3.21.0) --- updated-dependencies: - dependency-name: org.checkerframework:checker-qual dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 5c77f140..a845a74e 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -57,7 +57,7 @@ 2.7 23.0.0 - 3.20.0 + 3.21.0 From abdef5cb30430ce89863e28afb338715c01f5261 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Dec 2021 21:17:00 +0000 Subject: [PATCH 067/435] Bump jackson-databind from 2.13.0 to 2.13.1 Bumps [jackson-databind](https://github.com/FasterXML/jackson) from 2.13.0 to 2.13.1. - [Release notes](https://github.com/FasterXML/jackson/releases) - [Commits](https://github.com/FasterXML/jackson/commits) --- updated-dependencies: - dependency-name: com.fasterxml.jackson.core:jackson-databind dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index a845a74e..3391669a 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -36,7 +36,7 @@ 1.7.32 5.0.4 2.40.5 - 2.13.0 + 2.13.1 1.6.10 5.8.2 From 26f993e24150cab43f06f95bbfa74ddadd798579 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Dec 2021 21:22:51 +0000 Subject: [PATCH 068/435] Bump artemis.broker.version from 2.19.0 to 2.20.0 Bumps `artemis.broker.version` from 2.19.0 to 2.20.0. Updates `artemis-amqp-protocol` from 2.19.0 to 2.20.0 Updates `artemis-server` from 2.19.0 to 2.20.0 - [Release notes](https://github.com/apache/activemq-artemis/releases) - [Commits](https://github.com/apache/activemq-artemis/compare/2.19.0...2.20.0) --- updated-dependencies: - dependency-name: org.apache.activemq:artemis-amqp-protocol dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.apache.activemq:artemis-server dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 3391669a..625f5897 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -45,7 +45,7 @@ 4.2.0 4.1.1 - 2.19.0 + 2.20.0 3.8.1 3.1.0 From 1e7f4477d34b60ba5dba01ed647998f8e9c9439a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 23 Dec 2021 21:05:17 +0000 Subject: [PATCH 069/435] Bump qpid-jms-parent from 1.4.1 to 1.5.0 Bumps qpid-jms-parent from 1.4.1 to 1.5.0. --- updated-dependencies: - dependency-name: org.apache.qpid:qpid-jms-parent dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- cli-qpid-jms/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-qpid-jms/pom.xml b/cli-qpid-jms/pom.xml index f33b090d..7b73ab73 100644 --- a/cli-qpid-jms/pom.xml +++ b/cli-qpid-jms/pom.xml @@ -35,7 +35,7 @@ jms com.redhat.mqe.jms.Main - 1.4.1 + 1.5.0 ${qpid.jms.client.version} 2.0.46.Final linux-x86_64-fedora From a7184d94ad73a2dad35871bea0d3669f30ed4042 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 Dec 2021 21:09:54 +0000 Subject: [PATCH 070/435] Bump protonj2-client from 1.0.0-M3 to 1.0.0-M4 Bumps protonj2-client from 1.0.0-M3 to 1.0.0-M4. --- updated-dependencies: - dependency-name: org.apache.qpid:protonj2-client dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- cli-protonj2/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-protonj2/pom.xml b/cli-protonj2/pom.xml index 4cfad614..b66b40e6 100644 --- a/cli-protonj2/pom.xml +++ b/cli-protonj2/pom.xml @@ -34,7 +34,7 @@ jms - 1.0.0-M3 + 1.0.0-M4 com.redhat.mqe.Main ${protonj2.version} 2.0.39.Final From b2befbb306bdcb50fa9fab02af8804ec1b8ff663 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Dec 2021 21:08:50 +0000 Subject: [PATCH 071/435] Bump jaeger-client from 1.6.0 to 1.7.0 Bumps [jaeger-client](https://github.com/jaegertracing/jaeger-client-java) from 1.6.0 to 1.7.0. - [Release notes](https://github.com/jaegertracing/jaeger-client-java/releases) - [Changelog](https://github.com/jaegertracing/jaeger-client-java/blob/master/CHANGELOG.md) - [Commits](https://github.com/jaegertracing/jaeger-client-java/compare/v1.6.0...v1.7.0) --- updated-dependencies: - dependency-name: io.jaegertracing:jaeger-client dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- cli-qpid-jms/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-qpid-jms/pom.xml b/cli-qpid-jms/pom.xml index 7b73ab73..da66c17a 100644 --- a/cli-qpid-jms/pom.xml +++ b/cli-qpid-jms/pom.xml @@ -39,7 +39,7 @@ ${qpid.jms.client.version} 2.0.46.Final linux-x86_64-fedora - 1.6.0 + 1.7.0 From 71c216a32311f47488f082c9e795a1115686083f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Jan 2022 21:08:45 +0000 Subject: [PATCH 072/435] Bump checker-qual from 3.21.0 to 3.21.1 Bumps [checker-qual](https://github.com/typetools/checker-framework) from 3.21.0 to 3.21.1. - [Release notes](https://github.com/typetools/checker-framework/releases) - [Changelog](https://github.com/typetools/checker-framework/blob/master/docs/CHANGELOG.md) - [Commits](https://github.com/typetools/checker-framework/compare/checker-framework-3.21.0...checker-framework-3.21.1) --- updated-dependencies: - dependency-name: org.checkerframework:checker-qual dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 625f5897..36f7e05a 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -57,7 +57,7 @@ 2.7 23.0.0 - 3.21.0 + 3.21.1 From 28d72e33ee02073252cede3277d4cbee0ed8cc92 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 Jan 2022 08:57:32 +0000 Subject: [PATCH 073/435] Bump maven-jar-plugin from 3.2.0 to 3.2.1 Bumps [maven-jar-plugin](https://github.com/apache/maven-jar-plugin) from 3.2.0 to 3.2.1. - [Release notes](https://github.com/apache/maven-jar-plugin/releases) - [Commits](https://github.com/apache/maven-jar-plugin/compare/maven-jar-plugin-3.2.0...maven-jar-plugin-3.2.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-jar-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 36f7e05a..1f39fc13 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -50,7 +50,7 @@ 3.8.1 3.1.0 3.0.0 - 3.2.0 + 3.2.1 0.8.7 3.2.4 3.0.0-M5 From bda59c82687b585e8d6f70eac3698c0911404f4a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Jan 2022 21:04:26 +0000 Subject: [PATCH 074/435] Bump tcnative.version from 2.0.46.Final to 2.0.47.Final Bumps `tcnative.version` from 2.0.46.Final to 2.0.47.Final. Updates `netty-tcnative-boringssl-static` from 2.0.46.Final to 2.0.47.Final - [Release notes](https://github.com/netty/netty-tcnative/releases) - [Commits](https://github.com/netty/netty-tcnative/compare/netty-tcnative-parent-2.0.46.Final...netty-tcnative-parent-2.0.47.Final) Updates `netty-tcnative` from 2.0.46.Final to 2.0.47.Final - [Release notes](https://github.com/netty/netty-tcnative/releases) - [Commits](https://github.com/netty/netty-tcnative/compare/netty-tcnative-parent-2.0.46.Final...netty-tcnative-parent-2.0.47.Final) --- updated-dependencies: - dependency-name: io.netty:netty-tcnative-boringssl-static dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.netty:netty-tcnative:linux-x86_64-fedora dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- cli-qpid-jms/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-qpid-jms/pom.xml b/cli-qpid-jms/pom.xml index da66c17a..27080d12 100644 --- a/cli-qpid-jms/pom.xml +++ b/cli-qpid-jms/pom.xml @@ -37,7 +37,7 @@ com.redhat.mqe.jms.Main 1.5.0 ${qpid.jms.client.version} - 2.0.46.Final + 2.0.47.Final linux-x86_64-fedora 1.7.0 From 3b600209a5114ff25a2a60695bfa890abb6be12c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Jan 2022 21:30:47 +0000 Subject: [PATCH 075/435] Bump maven-jar-plugin from 3.2.1 to 3.2.2 Bumps [maven-jar-plugin](https://github.com/apache/maven-jar-plugin) from 3.2.1 to 3.2.2. - [Release notes](https://github.com/apache/maven-jar-plugin/releases) - [Commits](https://github.com/apache/maven-jar-plugin/compare/maven-jar-plugin-3.2.1...maven-jar-plugin-3.2.2) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-jar-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 1f39fc13..5723229d 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -50,7 +50,7 @@ 3.8.1 3.1.0 3.0.0 - 3.2.1 + 3.2.2 0.8.7 3.2.4 3.0.0-M5 From 2deff0ec22de4151ef8e7873607131a9a85e150a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Jan 2022 21:34:11 +0000 Subject: [PATCH 076/435] Bump maven-compiler-plugin from 3.8.1 to 3.9.0 Bumps [maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.8.1 to 3.9.0. - [Release notes](https://github.com/apache/maven-compiler-plugin/releases) - [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.8.1...maven-compiler-plugin-3.9.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-compiler-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 5723229d..3a2ad5e4 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -47,7 +47,7 @@ 2.20.0 - 3.8.1 + 3.9.0 3.1.0 3.0.0 3.2.2 From 7dc396721e10f9a606aac5730ff3df38917b203a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Jan 2022 21:38:50 +0000 Subject: [PATCH 077/435] Bump slf4j-log4j12 from 1.7.32 to 1.7.33 Bumps [slf4j-log4j12](https://github.com/qos-ch/slf4j) from 1.7.32 to 1.7.33. - [Release notes](https://github.com/qos-ch/slf4j/releases) - [Commits](https://github.com/qos-ch/slf4j/compare/v_1.7.32...v_1.7.33) --- updated-dependencies: - dependency-name: org.slf4j:slf4j-log4j12 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 3a2ad5e4..2eb8dfd7 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -33,7 +33,7 @@ pom - 1.7.32 + 1.7.33 5.0.4 2.40.5 2.13.1 From 73e2949eecd628a74d69f15cb2c6087bb5465cbe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Feb 2022 21:08:39 +0000 Subject: [PATCH 078/435] Bump checker-qual from 3.21.1 to 3.21.2 Bumps [checker-qual](https://github.com/typetools/checker-framework) from 3.21.1 to 3.21.2. - [Release notes](https://github.com/typetools/checker-framework/releases) - [Changelog](https://github.com/typetools/checker-framework/blob/master/docs/CHANGELOG.md) - [Commits](https://github.com/typetools/checker-framework/compare/checker-framework-3.21.1...checker-framework-3.21.2) --- updated-dependencies: - dependency-name: org.checkerframework:checker-qual dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 2eb8dfd7..d2794087 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -57,7 +57,7 @@ 2.7 23.0.0 - 3.21.1 + 3.21.2 From 7ef1f9d4240737db91f374faba1a80a534b52747 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Feb 2022 21:40:13 +0000 Subject: [PATCH 079/435] Bump jaeger-client from 1.7.0 to 1.8.0 Bumps [jaeger-client](https://github.com/jaegertracing/jaeger-client-java) from 1.7.0 to 1.8.0. - [Release notes](https://github.com/jaegertracing/jaeger-client-java/releases) - [Changelog](https://github.com/jaegertracing/jaeger-client-java/blob/master/CHANGELOG.md) - [Commits](https://github.com/jaegertracing/jaeger-client-java/compare/v1.7.0...v1.8.0) --- updated-dependencies: - dependency-name: io.jaegertracing:jaeger-client dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- cli-qpid-jms/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-qpid-jms/pom.xml b/cli-qpid-jms/pom.xml index 27080d12..c89107c5 100644 --- a/cli-qpid-jms/pom.xml +++ b/cli-qpid-jms/pom.xml @@ -39,7 +39,7 @@ ${qpid.jms.client.version} 2.0.47.Final linux-x86_64-fedora - 1.7.0 + 1.8.0 From f367720c56918f6822399ea4ee542ad1ee4a6f32 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Feb 2022 22:09:57 +0000 Subject: [PATCH 080/435] Bump mockito-core from 4.2.0 to 4.3.1 Bumps [mockito-core](https://github.com/mockito/mockito) from 4.2.0 to 4.3.1. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v4.2.0...v4.3.1) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index d2794087..9bc038da 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -42,7 +42,7 @@ 5.8.2 1.5.0 1.1.3 - 4.2.0 + 4.3.1 4.1.1 2.20.0 From 67a49cf399688bf0ca96d994c4aecdba9db51ba8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Feb 2022 22:13:55 +0000 Subject: [PATCH 081/435] Bump tcnative.version from 2.0.47.Final to 2.0.48.Final Bumps `tcnative.version` from 2.0.47.Final to 2.0.48.Final. Updates `netty-tcnative-boringssl-static` from 2.0.47.Final to 2.0.48.Final - [Release notes](https://github.com/netty/netty-tcnative/releases) - [Commits](https://github.com/netty/netty-tcnative/compare/netty-tcnative-parent-2.0.47.Final...netty-tcnative-parent-2.0.48.Final) Updates `netty-tcnative` from 2.0.47.Final to 2.0.48.Final - [Release notes](https://github.com/netty/netty-tcnative/releases) - [Commits](https://github.com/netty/netty-tcnative/compare/netty-tcnative-parent-2.0.47.Final...netty-tcnative-parent-2.0.48.Final) --- updated-dependencies: - dependency-name: io.netty:netty-tcnative-boringssl-static dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.netty:netty-tcnative:linux-x86_64-fedora dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- cli-qpid-jms/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-qpid-jms/pom.xml b/cli-qpid-jms/pom.xml index c89107c5..abe06baf 100644 --- a/cli-qpid-jms/pom.xml +++ b/cli-qpid-jms/pom.xml @@ -37,7 +37,7 @@ com.redhat.mqe.jms.Main 1.5.0 ${qpid.jms.client.version} - 2.0.47.Final + 2.0.48.Final linux-x86_64-fedora 1.8.0 From e8609b69a39598afc5db5f3ac1ccc384ba048595 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Feb 2022 21:03:23 +0000 Subject: [PATCH 082/435] Bump maven-compiler-plugin from 3.9.0 to 3.10.0 Bumps [maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.9.0 to 3.10.0. - [Release notes](https://github.com/apache/maven-compiler-plugin/releases) - [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.9.0...maven-compiler-plugin-3.10.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-compiler-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 9bc038da..37a55c25 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -47,7 +47,7 @@ 2.20.0 - 3.9.0 + 3.10.0 3.1.0 3.0.0 3.2.2 From 8ddc7dfd01f0a1dab97b4045e4c2609998a20ac7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Feb 2022 08:49:37 +0000 Subject: [PATCH 083/435] Bump picocli from 4.6.2 to 4.6.3 Bumps [picocli](https://github.com/remkop/picocli) from 4.6.2 to 4.6.3. - [Release notes](https://github.com/remkop/picocli/releases) - [Changelog](https://github.com/remkop/picocli/blob/main/RELEASE-NOTES.md) - [Commits](https://github.com/remkop/picocli/compare/v4.6.2...v4.6.3) --- updated-dependencies: - dependency-name: info.picocli:picocli dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- cli-protonj2/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-protonj2/pom.xml b/cli-protonj2/pom.xml index b66b40e6..dc694e22 100644 --- a/cli-protonj2/pom.xml +++ b/cli-protonj2/pom.xml @@ -87,7 +87,7 @@ info.picocli picocli - 4.6.2 + 4.6.3 From f0a434fecb272d6e9dc38cadf4c2d01e7cad8f85 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Feb 2022 21:03:37 +0000 Subject: [PATCH 084/435] Bump tcnative.version from 2.0.48.Final to 2.0.49.Final Bumps `tcnative.version` from 2.0.48.Final to 2.0.49.Final. Updates `netty-tcnative-boringssl-static` from 2.0.48.Final to 2.0.49.Final - [Release notes](https://github.com/netty/netty-tcnative/releases) - [Commits](https://github.com/netty/netty-tcnative/compare/netty-tcnative-parent-2.0.48.Final...netty-tcnative-parent-2.0.49.Final) Updates `netty-tcnative` from 2.0.48.Final to 2.0.49.Final - [Release notes](https://github.com/netty/netty-tcnative/releases) - [Commits](https://github.com/netty/netty-tcnative/compare/netty-tcnative-parent-2.0.48.Final...netty-tcnative-parent-2.0.49.Final) --- updated-dependencies: - dependency-name: io.netty:netty-tcnative-boringssl-static dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.netty:netty-tcnative:linux-x86_64-fedora dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- cli-qpid-jms/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-qpid-jms/pom.xml b/cli-qpid-jms/pom.xml index abe06baf..495d6809 100644 --- a/cli-qpid-jms/pom.xml +++ b/cli-qpid-jms/pom.xml @@ -37,7 +37,7 @@ com.redhat.mqe.jms.Main 1.5.0 ${qpid.jms.client.version} - 2.0.48.Final + 2.0.49.Final linux-x86_64-fedora 1.8.0 From 7d9fd827ab772711040ee0064dd6e5acb9a8d992 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 22 Feb 2022 13:34:22 +0000 Subject: [PATCH 085/435] Bump junit-pioneer from 1.5.0 to 1.6.1 Bumps [junit-pioneer](https://github.com/junit-pioneer/junit-pioneer) from 1.5.0 to 1.6.1. - [Release notes](https://github.com/junit-pioneer/junit-pioneer/releases) - [Commits](https://github.com/junit-pioneer/junit-pioneer/compare/v1.5.0...v1.6.1) --- updated-dependencies: - dependency-name: org.junit-pioneer:junit-pioneer dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 37a55c25..940e8837 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -40,7 +40,7 @@ 1.6.10 5.8.2 - 1.5.0 + 1.6.1 1.1.3 4.3.1 4.1.1 From b013b4ee96f06c5c85a3ef710ce788bb91695085 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 22 Feb 2022 13:37:37 +0000 Subject: [PATCH 086/435] Bump dagger.version from 2.40.5 to 2.41 Bumps `dagger.version` from 2.40.5 to 2.41. Updates `dagger` from 2.40.5 to 2.41 - [Release notes](https://github.com/google/dagger/releases) - [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md) - [Commits](https://github.com/google/dagger/compare/dagger-2.40.5...dagger-2.41) Updates `dagger-compiler` from 2.40.5 to 2.41 - [Release notes](https://github.com/google/dagger/releases) - [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md) - [Commits](https://github.com/google/dagger/compare/dagger-2.40.5...dagger-2.41) --- updated-dependencies: - dependency-name: com.google.dagger:dagger dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: com.google.dagger:dagger-compiler dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 940e8837..32c4846f 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -35,7 +35,7 @@ 1.7.33 5.0.4 - 2.40.5 + 2.41 2.13.1 1.6.10 From e268dbc969fa80991d6a7bbbe9e35eb4cf59a409 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 22 Feb 2022 13:44:39 +0000 Subject: [PATCH 087/435] Bump activemq-client from 5.16.3 to 5.16.4 Bumps [activemq-client](https://github.com/apache/activemq) from 5.16.3 to 5.16.4. - [Release notes](https://github.com/apache/activemq/releases) - [Commits](https://github.com/apache/activemq/compare/activemq-5.16.3...activemq-5.16.4) --- updated-dependencies: - dependency-name: org.apache.activemq:activemq-client dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- cli-activemq/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-activemq/pom.xml b/cli-activemq/pom.xml index f059bff8..6b8824e7 100644 --- a/cli-activemq/pom.xml +++ b/cli-activemq/pom.xml @@ -35,7 +35,7 @@ aoc com.redhat.mqe.aoc.Main - 5.16.3 + 5.16.4 ${activemq.client.version} From d02e9a6651187980a7d66c1236e74f11c76114ba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Feb 2022 21:05:52 +0000 Subject: [PATCH 088/435] Bump tcnative.version from 2.0.49.Final to 2.0.50.Final Bumps `tcnative.version` from 2.0.49.Final to 2.0.50.Final. Updates `netty-tcnative-boringssl-static` from 2.0.49.Final to 2.0.50.Final - [Release notes](https://github.com/netty/netty-tcnative/releases) - [Commits](https://github.com/netty/netty-tcnative/compare/netty-tcnative-parent-2.0.49.Final...netty-tcnative-parent-2.0.50.Final) Updates `netty-tcnative` from 2.0.49.Final to 2.0.50.Final - [Release notes](https://github.com/netty/netty-tcnative/releases) - [Commits](https://github.com/netty/netty-tcnative/compare/netty-tcnative-parent-2.0.49.Final...netty-tcnative-parent-2.0.50.Final) --- updated-dependencies: - dependency-name: io.netty:netty-tcnative-boringssl-static dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.netty:netty-tcnative:linux-x86_64-fedora dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- cli-qpid-jms/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-qpid-jms/pom.xml b/cli-qpid-jms/pom.xml index 495d6809..050d7bd2 100644 --- a/cli-qpid-jms/pom.xml +++ b/cli-qpid-jms/pom.xml @@ -37,7 +37,7 @@ com.redhat.mqe.jms.Main 1.5.0 ${qpid.jms.client.version} - 2.0.49.Final + 2.0.50.Final linux-x86_64-fedora 1.8.0 From 22babacd5dbca05938a3d5eb5e33b8280054f9c7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Mar 2022 21:02:31 +0000 Subject: [PATCH 089/435] Bump awaitility from 4.1.1 to 4.2.0 Bumps [awaitility](https://github.com/awaitility/awaitility) from 4.1.1 to 4.2.0. - [Release notes](https://github.com/awaitility/awaitility/releases) - [Changelog](https://github.com/awaitility/awaitility/blob/master/changelog.txt) - [Commits](https://github.com/awaitility/awaitility/compare/awaitility-4.1.1...awaitility-4.2.0) --- updated-dependencies: - dependency-name: org.awaitility:awaitility dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 32c4846f..f7846bff 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -43,7 +43,7 @@ 1.6.1 1.1.3 4.3.1 - 4.1.1 + 4.2.0 2.20.0 From 3d2df281701b88683cbbdb67e7decd4ce59bd06d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Mar 2022 23:54:27 +0000 Subject: [PATCH 090/435] Bump checker-qual from 3.21.2 to 3.21.3 Bumps [checker-qual](https://github.com/typetools/checker-framework) from 3.21.2 to 3.21.3. - [Release notes](https://github.com/typetools/checker-framework/releases) - [Changelog](https://github.com/typetools/checker-framework/blob/master/docs/CHANGELOG.md) - [Commits](https://github.com/typetools/checker-framework/compare/checker-framework-3.21.2...checker-framework-3.21.3) --- updated-dependencies: - dependency-name: org.checkerframework:checker-qual dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index f7846bff..acc2c509 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -57,7 +57,7 @@ 2.7 23.0.0 - 3.21.2 + 3.21.3 From 84a229fb57f7626f225333296a373961d7bb5e6d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Mar 2022 23:57:59 +0000 Subject: [PATCH 091/435] Bump guava from 31.0.1-android to 31.1-android Bumps [guava](https://github.com/google/guava) from 31.0.1-android to 31.1-android. - [Release notes](https://github.com/google/guava/releases) - [Commits](https://github.com/google/guava/commits) --- updated-dependencies: - dependency-name: com.google.guava:guava dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- cli-artemis-jms/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-artemis-jms/pom.xml b/cli-artemis-jms/pom.xml index 6e953967..353819b7 100644 --- a/cli-artemis-jms/pom.xml +++ b/cli-artemis-jms/pom.xml @@ -68,7 +68,7 @@ com.google.guava guava - 31.0.1-android + 31.1-android provided From b9d14f33dfa5ca2dfec32e6b128067ebd3b9a217 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Mar 2022 21:08:49 +0000 Subject: [PATCH 092/435] Bump jackson-databind from 2.13.1 to 2.13.2 Bumps [jackson-databind](https://github.com/FasterXML/jackson) from 2.13.1 to 2.13.2. - [Release notes](https://github.com/FasterXML/jackson/releases) - [Commits](https://github.com/FasterXML/jackson/commits) --- updated-dependencies: - dependency-name: com.fasterxml.jackson.core:jackson-databind dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index acc2c509..64ae5675 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -36,7 +36,7 @@ 1.7.33 5.0.4 2.41 - 2.13.1 + 2.13.2 1.6.10 5.8.2 From 94d6bb04b1ebac0fcc500f3c778dda228de5ef51 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Mar 2022 21:07:34 +0000 Subject: [PATCH 093/435] Bump junit-pioneer from 1.6.1 to 1.6.2 Bumps [junit-pioneer](https://github.com/junit-pioneer/junit-pioneer) from 1.6.1 to 1.6.2. - [Release notes](https://github.com/junit-pioneer/junit-pioneer/releases) - [Commits](https://github.com/junit-pioneer/junit-pioneer/compare/v1.6.1...v1.6.2) --- updated-dependencies: - dependency-name: org.junit-pioneer:junit-pioneer dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 64ae5675..6d81f62f 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -40,7 +40,7 @@ 1.6.10 5.8.2 - 1.6.1 + 1.6.2 1.1.3 4.3.1 4.2.0 From 84ae47142cb6bebec805f264d564e11cdde410af Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Mar 2022 21:12:03 +0000 Subject: [PATCH 094/435] Bump tcnative.version from 2.0.50.Final to 2.0.51.Final Bumps `tcnative.version` from 2.0.50.Final to 2.0.51.Final. Updates `netty-tcnative-boringssl-static` from 2.0.50.Final to 2.0.51.Final - [Release notes](https://github.com/netty/netty-tcnative/releases) - [Commits](https://github.com/netty/netty-tcnative/compare/netty-tcnative-parent-2.0.50.Final...netty-tcnative-parent-2.0.51.Final) Updates `netty-tcnative` from 2.0.50.Final to 2.0.51.Final - [Release notes](https://github.com/netty/netty-tcnative/releases) - [Commits](https://github.com/netty/netty-tcnative/compare/netty-tcnative-parent-2.0.50.Final...netty-tcnative-parent-2.0.51.Final) --- updated-dependencies: - dependency-name: io.netty:netty-tcnative-boringssl-static dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.netty:netty-tcnative:linux-x86_64-fedora dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- cli-qpid-jms/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-qpid-jms/pom.xml b/cli-qpid-jms/pom.xml index 050d7bd2..1fb722d2 100644 --- a/cli-qpid-jms/pom.xml +++ b/cli-qpid-jms/pom.xml @@ -37,7 +37,7 @@ com.redhat.mqe.jms.Main 1.5.0 ${qpid.jms.client.version} - 2.0.50.Final + 2.0.51.Final linux-x86_64-fedora 1.8.0 From eab686e2adb88d7127f558e6ca0fb26789905ea3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Mar 2022 21:15:40 +0000 Subject: [PATCH 095/435] Bump maven-compiler-plugin from 3.10.0 to 3.10.1 Bumps [maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.10.0 to 3.10.1. - [Release notes](https://github.com/apache/maven-compiler-plugin/releases) - [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.10.0...maven-compiler-plugin-3.10.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-compiler-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 6d81f62f..abbd5fa6 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -47,7 +47,7 @@ 2.20.0 - 3.10.0 + 3.10.1 3.1.0 3.0.0 3.2.2 From 21993aff300387cc1874c747de3e18256f581d28 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Mar 2022 21:18:34 +0000 Subject: [PATCH 096/435] Bump mockito-core from 4.3.1 to 4.4.0 Bumps [mockito-core](https://github.com/mockito/mockito) from 4.3.1 to 4.4.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v4.3.1...v4.4.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index abbd5fa6..73a93006 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -42,7 +42,7 @@ 5.8.2 1.6.2 1.1.3 - 4.3.1 + 4.4.0 4.2.0 2.20.0 From e0be50ff97be88bc1a430b09a83c6b334240de14 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 25 Mar 2022 21:03:49 +0000 Subject: [PATCH 097/435] Bump jackson-databind from 2.13.2 to 2.13.2.1 Bumps [jackson-databind](https://github.com/FasterXML/jackson) from 2.13.2 to 2.13.2.1. - [Release notes](https://github.com/FasterXML/jackson/releases) - [Commits](https://github.com/FasterXML/jackson/commits) --- updated-dependencies: - dependency-name: com.fasterxml.jackson.core:jackson-databind dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 73a93006..fad2692e 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -36,7 +36,7 @@ 1.7.33 5.0.4 2.41 - 2.13.2 + 2.13.2.1 1.6.10 5.8.2 From 78a6d5c944ac169447df3aec01a7bb964bb53cf1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 25 Mar 2022 21:42:15 +0000 Subject: [PATCH 098/435] Bump activemq-client from 5.16.4 to 5.17.0 Bumps [activemq-client](https://github.com/apache/activemq) from 5.16.4 to 5.17.0. - [Release notes](https://github.com/apache/activemq/releases) - [Commits](https://github.com/apache/activemq/compare/activemq-5.16.4...activemq-5.17.0) --- updated-dependencies: - dependency-name: org.apache.activemq:activemq-client dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- cli-activemq/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-activemq/pom.xml b/cli-activemq/pom.xml index 6b8824e7..3336303f 100644 --- a/cli-activemq/pom.xml +++ b/cli-activemq/pom.xml @@ -35,7 +35,7 @@ aoc com.redhat.mqe.aoc.Main - 5.16.4 + 5.17.0 ${activemq.client.version} From f907c9bee6c0bf181f74f9f1d9349de54597ef10 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Mar 2022 21:09:45 +0000 Subject: [PATCH 099/435] Bump maven-shade-plugin from 3.2.4 to 3.3.0 Bumps [maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.2.4 to 3.3.0. - [Release notes](https://github.com/apache/maven-shade-plugin/releases) - [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.2.4...maven-shade-plugin-3.3.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-shade-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index fad2692e..81fd34ec 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -52,7 +52,7 @@ 3.0.0 3.2.2 0.8.7 - 3.2.4 + 3.3.0 3.0.0-M5 2.7 From 047a213d6fd21d826bba1c776c413330de055b8d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Mar 2022 07:25:19 +0000 Subject: [PATCH 100/435] Bump artemis.jms.client.version from 2.20.0 to 2.21.0 Bumps `artemis.jms.client.version` from 2.20.0 to 2.21.0. Updates `artemis-jms-client` from 2.20.0 to 2.21.0 - [Release notes](https://github.com/apache/activemq-artemis/releases) - [Commits](https://github.com/apache/activemq-artemis/compare/2.20.0...2.21.0) Updates `artemis-commons` from 2.20.0 to 2.21.0 - [Release notes](https://github.com/apache/activemq-artemis/releases) - [Commits](https://github.com/apache/activemq-artemis/compare/2.20.0...2.21.0) --- updated-dependencies: - dependency-name: org.apache.activemq:artemis-jms-client dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.apache.activemq:artemis-commons dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- cli-artemis-jms/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-artemis-jms/pom.xml b/cli-artemis-jms/pom.xml index 353819b7..0dfacd9c 100644 --- a/cli-artemis-jms/pom.xml +++ b/cli-artemis-jms/pom.xml @@ -36,7 +36,7 @@ acc com.redhat.mqe.acc.Main false - 2.20.0 + 2.21.0 ${artemis.jms.client.version} From 5081adf0ca4db091743d812eb206a5baf75332c6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Mar 2022 07:28:36 +0000 Subject: [PATCH 101/435] Bump jackson-databind from 2.13.2.1 to 2.13.2.2 Bumps [jackson-databind](https://github.com/FasterXML/jackson) from 2.13.2.1 to 2.13.2.2. - [Release notes](https://github.com/FasterXML/jackson/releases) - [Commits](https://github.com/FasterXML/jackson/commits) --- updated-dependencies: - dependency-name: com.fasterxml.jackson.core:jackson-databind dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 81fd34ec..60d60ea7 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -36,7 +36,7 @@ 1.7.33 5.0.4 2.41 - 2.13.2.1 + 2.13.2.2 1.6.10 5.8.2 From 0145170118d91f6deb1966af23b79c0067ec5325 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Mar 2022 07:32:22 +0000 Subject: [PATCH 102/435] Bump artemis.broker.version from 2.20.0 to 2.21.0 Bumps `artemis.broker.version` from 2.20.0 to 2.21.0. Updates `artemis-amqp-protocol` from 2.20.0 to 2.21.0 Updates `artemis-server` from 2.20.0 to 2.21.0 - [Release notes](https://github.com/apache/activemq-artemis/releases) - [Commits](https://github.com/apache/activemq-artemis/compare/2.20.0...2.21.0) --- updated-dependencies: - dependency-name: org.apache.activemq:artemis-amqp-protocol dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.apache.activemq:artemis-server dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 60d60ea7..9600c1be 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -45,7 +45,7 @@ 4.4.0 4.2.0 - 2.20.0 + 2.21.0 3.10.1 3.1.0 From 4bae576191af62dd94c3f7318e125f237c17a249 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 31 Mar 2022 21:04:00 +0000 Subject: [PATCH 103/435] Bump qpid-jms-parent from 1.5.0 to 1.6.0 Bumps qpid-jms-parent from 1.5.0 to 1.6.0. --- updated-dependencies: - dependency-name: org.apache.qpid:qpid-jms-parent dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- cli-qpid-jms/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-qpid-jms/pom.xml b/cli-qpid-jms/pom.xml index 1fb722d2..254bf4d5 100644 --- a/cli-qpid-jms/pom.xml +++ b/cli-qpid-jms/pom.xml @@ -35,7 +35,7 @@ jms com.redhat.mqe.jms.Main - 1.5.0 + 1.6.0 ${qpid.jms.client.version} 2.0.51.Final linux-x86_64-fedora From c4ac0ba693e4abe9f1e55c891094f6249147ec8a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Apr 2022 21:10:27 +0000 Subject: [PATCH 104/435] Bump checker-qual from 3.21.3 to 3.21.4 Bumps [checker-qual](https://github.com/typetools/checker-framework) from 3.21.3 to 3.21.4. - [Release notes](https://github.com/typetools/checker-framework/releases) - [Changelog](https://github.com/typetools/checker-framework/blob/master/docs/CHANGELOG.md) - [Commits](https://github.com/typetools/checker-framework/compare/checker-framework-3.21.3...checker-framework-3.21.4) --- updated-dependencies: - dependency-name: org.checkerframework:checker-qual dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 9600c1be..cf8bfabc 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -57,7 +57,7 @@ 2.7 23.0.0 - 3.21.3 + 3.21.4 From 05d137c86ae40155f96838121a2c497d2513ea46 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 2 Apr 2022 09:35:09 +0000 Subject: [PATCH 105/435] Bump kotlin.version from 1.6.10 to 1.6.20 Bumps `kotlin.version` from 1.6.10 to 1.6.20. Updates `kotlin-stdlib` from 1.6.10 to 1.6.20 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/commits) Updates `kotlin-stdlib-jdk8` from 1.6.10 to 1.6.20 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/commits) Updates `kotlin-test-junit` from 1.6.10 to 1.6.20 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/commits) Updates `kotlin-maven-plugin` from 1.6.10 to 1.6.20 Updates `kotlin-reflect` from 1.6.10 to 1.6.20 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/commits) --- updated-dependencies: - dependency-name: org.jetbrains.kotlin:kotlin-stdlib dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-stdlib-jdk8 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-test-junit dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-reflect dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index cf8bfabc..227cd924 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -38,7 +38,7 @@ 2.41 2.13.2.2 - 1.6.10 + 1.6.20 5.8.2 1.6.2 1.1.3 From 19dc89e16d0ecf1d9124b2520a2276230c72c13c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Apr 2022 21:06:41 +0000 Subject: [PATCH 106/435] Bump junit-pioneer from 1.6.2 to 1.7.0 Bumps [junit-pioneer](https://github.com/junit-pioneer/junit-pioneer) from 1.6.2 to 1.7.0. - [Release notes](https://github.com/junit-pioneer/junit-pioneer/releases) - [Commits](https://github.com/junit-pioneer/junit-pioneer/compare/v1.6.2...v1.7.0) --- updated-dependencies: - dependency-name: org.junit-pioneer:junit-pioneer dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 227cd924..c0bca9dc 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -40,7 +40,7 @@ 1.6.20 5.8.2 - 1.6.2 + 1.7.0 1.1.3 4.4.0 4.2.0 From bde91f7925508c3e88e2c2b82bfa066c3ebf0e27 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Apr 2022 23:11:17 +0000 Subject: [PATCH 107/435] Bump jacoco-maven-plugin from 0.8.7 to 0.8.8 Bumps [jacoco-maven-plugin](https://github.com/jacoco/jacoco) from 0.8.7 to 0.8.8. - [Release notes](https://github.com/jacoco/jacoco/releases) - [Commits](https://github.com/jacoco/jacoco/compare/v0.8.7...v0.8.8) --- updated-dependencies: - dependency-name: org.jacoco:jacoco-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index c0bca9dc..4c1e14b1 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -51,7 +51,7 @@ 3.1.0 3.0.0 3.2.2 - 0.8.7 + 0.8.8 3.3.0 3.0.0-M5 2.7 From 1d38f47f323ed82fab9d6bcd8d7ba4a3c0c46222 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Apr 2022 23:14:25 +0000 Subject: [PATCH 108/435] Bump maven-surefire-plugin from 3.0.0-M5 to 3.0.0-M6 Bumps [maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.0.0-M5 to 3.0.0-M6. - [Release notes](https://github.com/apache/maven-surefire/releases) - [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.0.0-M5...surefire-3.0.0-M6) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-surefire-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 4c1e14b1..0f355328 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -53,7 +53,7 @@ 3.2.2 0.8.8 3.3.0 - 3.0.0-M5 + 3.0.0-M6 2.7 23.0.0 From 1f1ed125d57864a07941c8c06aacd1668d3a3543 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Apr 2022 23:20:32 +0000 Subject: [PATCH 109/435] Bump protonj2-client from 1.0.0-M4 to 1.0.0-M5 Bumps protonj2-client from 1.0.0-M4 to 1.0.0-M5. --- updated-dependencies: - dependency-name: org.apache.qpid:protonj2-client dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- cli-protonj2/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-protonj2/pom.xml b/cli-protonj2/pom.xml index dc694e22..e2204278 100644 --- a/cli-protonj2/pom.xml +++ b/cli-protonj2/pom.xml @@ -34,7 +34,7 @@ jms - 1.0.0-M4 + 1.0.0-M5 com.redhat.mqe.Main ${protonj2.version} 2.0.39.Final From 59c0eca14c6314b7cf55628a4fb254a4cb8e239c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Apr 2022 21:14:02 +0000 Subject: [PATCH 110/435] Bump mockito-core from 4.4.0 to 4.5.0 Bumps [mockito-core](https://github.com/mockito/mockito) from 4.4.0 to 4.5.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v4.4.0...v4.5.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 0f355328..d16846d4 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -42,7 +42,7 @@ 5.8.2 1.7.0 1.1.3 - 4.4.0 + 4.5.0 4.2.0 2.21.0 From c45a3faa55f3870007a604b4a431546e132c993d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Apr 2022 21:44:02 +0000 Subject: [PATCH 111/435] Bump kotlin.version from 1.6.20 to 1.6.21 Bumps `kotlin.version` from 1.6.20 to 1.6.21. Updates `kotlin-stdlib` from 1.6.20 to 1.6.21 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/commits) Updates `kotlin-stdlib-jdk8` from 1.6.20 to 1.6.21 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/commits) Updates `kotlin-test-junit` from 1.6.20 to 1.6.21 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/commits) Updates `kotlin-maven-plugin` from 1.6.20 to 1.6.21 Updates `kotlin-reflect` from 1.6.20 to 1.6.21 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/commits) --- updated-dependencies: - dependency-name: org.jetbrains.kotlin:kotlin-stdlib dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-stdlib-jdk8 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-test-junit dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-reflect dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index d16846d4..96e9c2f0 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -38,7 +38,7 @@ 2.41 2.13.2.2 - 1.6.20 + 1.6.21 5.8.2 1.7.0 1.1.3 From 00e94b091e607a8d4a84661397e3c51319320857 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Apr 2022 21:09:22 +0000 Subject: [PATCH 112/435] Bump mockito-core from 4.5.0 to 4.5.1 Bumps [mockito-core](https://github.com/mockito/mockito) from 4.5.0 to 4.5.1. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v4.5.0...v4.5.1) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 96e9c2f0..a913633f 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -42,7 +42,7 @@ 5.8.2 1.7.0 1.1.3 - 4.5.0 + 4.5.1 4.2.0 2.21.0 From 271bcd458282d31c909d7611fded6e37cd65ff60 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 May 2022 21:08:14 +0000 Subject: [PATCH 113/435] Bump checker-qual from 3.21.4 to 3.22.0 Bumps [checker-qual](https://github.com/typetools/checker-framework) from 3.21.4 to 3.22.0. - [Release notes](https://github.com/typetools/checker-framework/releases) - [Changelog](https://github.com/typetools/checker-framework/blob/master/docs/CHANGELOG.md) - [Commits](https://github.com/typetools/checker-framework/compare/checker-framework-3.21.4...checker-framework-3.22.0) --- updated-dependencies: - dependency-name: org.checkerframework:checker-qual dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index a913633f..6df21139 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -57,7 +57,7 @@ 2.7 23.0.0 - 3.21.4 + 3.22.0 From 20cce764e71ab9fe2893fdfffd6b9d125691cf01 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 May 2022 21:56:57 +0000 Subject: [PATCH 114/435] Bump activemq-client from 5.17.0 to 5.17.1 Bumps [activemq-client](https://github.com/apache/activemq) from 5.17.0 to 5.17.1. - [Release notes](https://github.com/apache/activemq/releases) - [Commits](https://github.com/apache/activemq/compare/activemq-5.17.0...activemq-5.17.1) --- updated-dependencies: - dependency-name: org.apache.activemq:activemq-client dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- cli-activemq/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-activemq/pom.xml b/cli-activemq/pom.xml index 3336303f..2c6c5e00 100644 --- a/cli-activemq/pom.xml +++ b/cli-activemq/pom.xml @@ -35,7 +35,7 @@ aoc com.redhat.mqe.aoc.Main - 5.17.0 + 5.17.1 ${activemq.client.version} From f925975c6f62daab0f343d258bebd8931b72a08c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 May 2022 21:02:48 +0000 Subject: [PATCH 115/435] Bump artemis.broker.version from 2.21.0 to 2.22.0 Bumps `artemis.broker.version` from 2.21.0 to 2.22.0. Updates `artemis-amqp-protocol` from 2.21.0 to 2.22.0 Updates `artemis-server` from 2.21.0 to 2.22.0 - [Release notes](https://github.com/apache/activemq-artemis/releases) - [Commits](https://github.com/apache/activemq-artemis/compare/2.21.0...2.22.0) --- updated-dependencies: - dependency-name: org.apache.activemq:artemis-amqp-protocol dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.apache.activemq:artemis-server dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index 6df21139..508a9197 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -45,7 +45,7 @@ 4.5.1 4.2.0 - 2.21.0 + 2.22.0 3.10.1 3.1.0 From 2bdfc19e370642ad08c6ad427d220d3701cfb3eb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 May 2022 08:41:19 +0000 Subject: [PATCH 116/435] Bump artemis.jms.client.version from 2.21.0 to 2.22.0 Bumps `artemis.jms.client.version` from 2.21.0 to 2.22.0. Updates `artemis-jms-client` from 2.21.0 to 2.22.0 - [Release notes](https://github.com/apache/activemq-artemis/releases) - [Commits](https://github.com/apache/activemq-artemis/compare/2.21.0...2.22.0) Updates `artemis-commons` from 2.21.0 to 2.22.0 - [Release notes](https://github.com/apache/activemq-artemis/releases) - [Commits](https://github.com/apache/activemq-artemis/compare/2.21.0...2.22.0) --- updated-dependencies: - dependency-name: org.apache.activemq:artemis-jms-client dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.apache.activemq:artemis-commons dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- cli-artemis-jms/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-artemis-jms/pom.xml b/cli-artemis-jms/pom.xml index 0dfacd9c..efa3baa2 100644 --- a/cli-artemis-jms/pom.xml +++ b/cli-artemis-jms/pom.xml @@ -36,7 +36,7 @@ acc com.redhat.mqe.acc.Main false - 2.21.0 + 2.22.0 ${artemis.jms.client.version} From b7bcc5915233ac6311c8c0171256b723c3c8322f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 May 2022 21:09:02 +0000 Subject: [PATCH 117/435] Bump tcnative.version from 2.0.51.Final to 2.0.52.Final Bumps `tcnative.version` from 2.0.51.Final to 2.0.52.Final. Updates `netty-tcnative-boringssl-static` from 2.0.51.Final to 2.0.52.Final - [Release notes](https://github.com/netty/netty-tcnative/releases) - [Commits](https://github.com/netty/netty-tcnative/compare/netty-tcnative-parent-2.0.51.Final...netty-tcnative-parent-2.0.52.Final) Updates `netty-tcnative` from 2.0.51.Final to 2.0.52.Final - [Release notes](https://github.com/netty/netty-tcnative/releases) - [Commits](https://github.com/netty/netty-tcnative/compare/netty-tcnative-parent-2.0.51.Final...netty-tcnative-parent-2.0.52.Final) --- updated-dependencies: - dependency-name: io.netty:netty-tcnative-boringssl-static dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.netty:netty-tcnative:linux-x86_64-fedora dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- cli-qpid-jms/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-qpid-jms/pom.xml b/cli-qpid-jms/pom.xml index 254bf4d5..fef0ddbf 100644 --- a/cli-qpid-jms/pom.xml +++ b/cli-qpid-jms/pom.xml @@ -37,7 +37,7 @@ com.redhat.mqe.jms.Main 1.6.0 ${qpid.jms.client.version} - 2.0.51.Final + 2.0.52.Final linux-x86_64-fedora 1.8.0 From a02ce3b47cf8e9eed8cbaa78935187ee44f22251 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Tue, 10 May 2022 01:02:30 +0200 Subject: [PATCH 118/435] Upgrade to qpid-jms 2.0.0 (#392) The idea is to clone `jmslib` into `jakartalib` and use that in cli-qpid-jms. Eventually, all libs will migrate to the jakarta api. --- bom/pom.xml | 27 +- cli-activemq/pom.xml | 6 + cli-qpid-jms/pom.xml | 10 +- .../redhat/mqe/jms/AacConnectionManager.java | 8 +- .../src/test/java/ConnectWithoutPassword.java | 6 +- cli-qpid-jms/src/test/java/ENTMQCL1860.java | 12 +- .../src/test/java/QPIDJMS412Test.java | 10 +- .../src/test/java/QPIDJMS451Test.java | 16 +- .../src/test/java/QPIDJMS484Test.java | 10 +- .../src/test/kotlin/MessageFormatterTest.kt | 2 +- .../src/test/kotlin/QPIDJMS357Test.kt | 6 +- .../src/test/kotlin/QPIDJMS391Test.kt | 6 +- .../src/test/kotlin/QPIDJMS502Test.kt | 6 +- jakartalib/pom.xml | 89 ++++ .../mqe/lib/AMQPJmsMessageFormatter.java | 39 ++ .../main/java/com/redhat/mqe/lib/Args.java | 26 + .../main/java/com/redhat/mqe/lib/Client.java | 31 ++ .../redhat/mqe/lib/ClientOptionManager.java | 491 ++++++++++++++++++ .../com/redhat/mqe/lib/ClientOptions.java | 419 +++++++++++++++ .../com/redhat/mqe/lib/ConnectionManager.java | 65 +++ .../mqe/lib/ConnectionManagerFactory.java | 28 + .../com/redhat/mqe/lib/ConnectorClient.java | 167 ++++++ .../com/redhat/mqe/lib/ConnectorOptions.java | 95 ++++ .../java/com/redhat/mqe/lib/CoreClient.java | 486 +++++++++++++++++ .../mqe/lib/CoreJmsMessageFormatter.java | 43 ++ .../redhat/mqe/lib/JmsMessageFormatter.java | 290 +++++++++++ .../java/com/redhat/mqe/lib/JmsUtils.java | 141 +++++ .../redhat/mqe/lib/JndiConnectionManager.java | 79 +++ .../main/java/com/redhat/mqe/lib/Main.java | 57 ++ .../com/redhat/mqe/lib/MessageBrowser.java | 87 ++++ .../redhat/mqe/lib/MessageListenerImpl.java | 37 ++ .../mqe/lib/MessagingExceptionListener.java | 39 ++ .../mqe/lib/OpenwireJmsMessageFormatter.java | 42 ++ .../main/java/com/redhat/mqe/lib/Option.java | 219 ++++++++ .../com/redhat/mqe/lib/ReceiverClient.java | 303 +++++++++++ .../com/redhat/mqe/lib/ReceiverOptions.java | 133 +++++ .../java/com/redhat/mqe/lib/SenderClient.java | 222 ++++++++ .../com/redhat/mqe/lib/SenderOptions.java | 141 +++++ .../mqe/lib/message/BytesMessageProvider.java | 69 +++ .../mqe/lib/message/EmptyMessageProvider.java | 45 ++ .../mqe/lib/message/MapMessageProvider.java | 107 ++++ .../mqe/lib/message/MessageProvider.java | 303 +++++++++++ .../lib/message/ObjectMessageProvider.java | 52 ++ .../lib/message/StreamMessageProvider.java | 62 +++ .../mqe/lib/message/TextMessageProvider.java | 71 +++ .../java/com/redhat/mqe/lib/FakeClient.java | 73 +++ jakartalib/src/test/kotlin/MainTest.kt | 38 ++ .../lib/AbstractJmsMessageFormatterTest.kt | 62 +++ .../com/redhat/mqe/lib/InteractionTest.kt | 97 ++++ .../org.mockito.plugins.MockMaker | 1 + jmslib/pom.xml | 23 + .../lib/AbstractJmsMessageFormatterTest.kt | 4 +- parent/pom.xml | 2 + pom.xml | 1 + 54 files changed, 4858 insertions(+), 46 deletions(-) create mode 100644 jakartalib/pom.xml create mode 100644 jakartalib/src/main/java/com/redhat/mqe/lib/AMQPJmsMessageFormatter.java create mode 100644 jakartalib/src/main/java/com/redhat/mqe/lib/Args.java create mode 100644 jakartalib/src/main/java/com/redhat/mqe/lib/Client.java create mode 100644 jakartalib/src/main/java/com/redhat/mqe/lib/ClientOptionManager.java create mode 100644 jakartalib/src/main/java/com/redhat/mqe/lib/ClientOptions.java create mode 100644 jakartalib/src/main/java/com/redhat/mqe/lib/ConnectionManager.java create mode 100644 jakartalib/src/main/java/com/redhat/mqe/lib/ConnectionManagerFactory.java create mode 100644 jakartalib/src/main/java/com/redhat/mqe/lib/ConnectorClient.java create mode 100644 jakartalib/src/main/java/com/redhat/mqe/lib/ConnectorOptions.java create mode 100644 jakartalib/src/main/java/com/redhat/mqe/lib/CoreClient.java create mode 100644 jakartalib/src/main/java/com/redhat/mqe/lib/CoreJmsMessageFormatter.java create mode 100644 jakartalib/src/main/java/com/redhat/mqe/lib/JmsMessageFormatter.java create mode 100644 jakartalib/src/main/java/com/redhat/mqe/lib/JmsUtils.java create mode 100644 jakartalib/src/main/java/com/redhat/mqe/lib/JndiConnectionManager.java create mode 100644 jakartalib/src/main/java/com/redhat/mqe/lib/Main.java create mode 100644 jakartalib/src/main/java/com/redhat/mqe/lib/MessageBrowser.java create mode 100644 jakartalib/src/main/java/com/redhat/mqe/lib/MessageListenerImpl.java create mode 100644 jakartalib/src/main/java/com/redhat/mqe/lib/MessagingExceptionListener.java create mode 100644 jakartalib/src/main/java/com/redhat/mqe/lib/OpenwireJmsMessageFormatter.java create mode 100644 jakartalib/src/main/java/com/redhat/mqe/lib/Option.java create mode 100644 jakartalib/src/main/java/com/redhat/mqe/lib/ReceiverClient.java create mode 100644 jakartalib/src/main/java/com/redhat/mqe/lib/ReceiverOptions.java create mode 100644 jakartalib/src/main/java/com/redhat/mqe/lib/SenderClient.java create mode 100644 jakartalib/src/main/java/com/redhat/mqe/lib/SenderOptions.java create mode 100644 jakartalib/src/main/java/com/redhat/mqe/lib/message/BytesMessageProvider.java create mode 100644 jakartalib/src/main/java/com/redhat/mqe/lib/message/EmptyMessageProvider.java create mode 100644 jakartalib/src/main/java/com/redhat/mqe/lib/message/MapMessageProvider.java create mode 100644 jakartalib/src/main/java/com/redhat/mqe/lib/message/MessageProvider.java create mode 100644 jakartalib/src/main/java/com/redhat/mqe/lib/message/ObjectMessageProvider.java create mode 100644 jakartalib/src/main/java/com/redhat/mqe/lib/message/StreamMessageProvider.java create mode 100644 jakartalib/src/main/java/com/redhat/mqe/lib/message/TextMessageProvider.java create mode 100644 jakartalib/src/test/java/com/redhat/mqe/lib/FakeClient.java create mode 100644 jakartalib/src/test/kotlin/MainTest.kt create mode 100644 jakartalib/src/test/kotlin/com/redhat/mqe/lib/AbstractJmsMessageFormatterTest.kt create mode 100644 jakartalib/src/test/kotlin/com/redhat/mqe/lib/InteractionTest.kt create mode 100644 jakartalib/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker rename {tests => jmslib}/src/test/kotlin/com/redhat/mqe/lib/AbstractJmsMessageFormatterTest.kt (94%) diff --git a/bom/pom.xml b/bom/pom.xml index 508a9197..b6b1714d 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -87,7 +87,13 @@ ${annotations.version} - + + + jakarta.jms + jakarta.jms-api + 3.0.0 + + org.apache.geronimo.specs geronimo-jms_1.1_spec @@ -110,6 +116,11 @@ jmslib 1.2.2-SNAPSHOT + + com.redhat.cli-java + jakartalib + 1.2.2-SNAPSHOT + com.redhat.cli-java lib @@ -122,6 +133,20 @@ test-jar test + + com.redhat.cli-java + jmslib + 1.2.2-SNAPSHOT + test-jar + test + + + com.redhat.cli-java + jakartalib + 1.2.2-SNAPSHOT + test-jar + test + diff --git a/cli-activemq/pom.xml b/cli-activemq/pom.xml index 2c6c5e00..05ed46c7 100644 --- a/cli-activemq/pom.xml +++ b/cli-activemq/pom.xml @@ -60,6 +60,12 @@ test-jar test + + com.redhat.cli-java + jmslib + test-jar + test + com.google.truth truth diff --git a/cli-qpid-jms/pom.xml b/cli-qpid-jms/pom.xml index fef0ddbf..75a71dc0 100644 --- a/cli-qpid-jms/pom.xml +++ b/cli-qpid-jms/pom.xml @@ -35,7 +35,7 @@ jms com.redhat.mqe.jms.Main - 1.6.0 + 2.0.0 ${qpid.jms.client.version} 2.0.52.Final linux-x86_64-fedora @@ -68,7 +68,7 @@ com.redhat.cli-java - jmslib + jakartalib @@ -99,6 +99,12 @@ test-jar test + + com.redhat.cli-java + jakartalib + test-jar + test + com.google.truth truth diff --git a/cli-qpid-jms/src/main/java/com/redhat/mqe/jms/AacConnectionManager.java b/cli-qpid-jms/src/main/java/com/redhat/mqe/jms/AacConnectionManager.java index 3887b25f..d04f8f1d 100644 --- a/cli-qpid-jms/src/main/java/com/redhat/mqe/jms/AacConnectionManager.java +++ b/cli-qpid-jms/src/main/java/com/redhat/mqe/jms/AacConnectionManager.java @@ -28,10 +28,10 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.jms.Connection; -import javax.jms.JMSException; -import javax.jms.Queue; -import javax.jms.Topic; +import jakarta.jms.Connection; +import jakarta.jms.JMSException; +import jakarta.jms.Queue; +import jakarta.jms.Topic; public class AacConnectionManager extends ConnectionManager { static final String QUEUE_OBJECT = "javax.jms.Queue"; diff --git a/cli-qpid-jms/src/test/java/ConnectWithoutPassword.java b/cli-qpid-jms/src/test/java/ConnectWithoutPassword.java index 565889e2..2044bcf3 100644 --- a/cli-qpid-jms/src/test/java/ConnectWithoutPassword.java +++ b/cli-qpid-jms/src/test/java/ConnectWithoutPassword.java @@ -25,9 +25,9 @@ import org.junit.jupiter.api.Test; import util.Broker; -import javax.jms.Connection; -import javax.jms.ConnectionFactory; -import javax.jms.JMSSecurityException; +import jakarta.jms.Connection; +import jakarta.jms.ConnectionFactory; +import jakarta.jms.JMSSecurityException; import java.time.Duration; @SuppressWarnings("Duplicates") diff --git a/cli-qpid-jms/src/test/java/ENTMQCL1860.java b/cli-qpid-jms/src/test/java/ENTMQCL1860.java index a70e851d..04e922a9 100644 --- a/cli-qpid-jms/src/test/java/ENTMQCL1860.java +++ b/cli-qpid-jms/src/test/java/ENTMQCL1860.java @@ -27,11 +27,11 @@ import util.Broker; import util.BrokerFixture; -import javax.jms.Connection; -import javax.jms.Message; -import javax.jms.MessageConsumer; -import javax.jms.MessageProducer; -import javax.jms.Session; +import jakarta.jms.Connection; +import jakarta.jms.Message; +import jakarta.jms.MessageConsumer; +import jakarta.jms.MessageProducer; +import jakarta.jms.Session; import java.util.concurrent.TimeUnit; import static com.google.common.truth.Truth.assertThat; @@ -63,7 +63,7 @@ void testAckWithSessionClose(@BrokerFixture.TempBroker Broker broker) throws Exc try { Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); - javax.jms.Queue queue = session.createQueue(getQueueName()); + jakarta.jms.Queue queue = session.createQueue(getQueueName()); MessageProducer producer = session.createProducer(queue); producer.send(session.createMessage()); connection.close(); diff --git a/cli-qpid-jms/src/test/java/QPIDJMS412Test.java b/cli-qpid-jms/src/test/java/QPIDJMS412Test.java index bef46b6c..c9c14c1a 100644 --- a/cli-qpid-jms/src/test/java/QPIDJMS412Test.java +++ b/cli-qpid-jms/src/test/java/QPIDJMS412Test.java @@ -12,11 +12,11 @@ import org.junit.jupiter.api.Test; import util.Broker; -import javax.jms.Connection; -import javax.jms.ConnectionFactory; -import javax.jms.JMSException; -import javax.jms.JMSSecurityException; -import javax.jms.Session; +import jakarta.jms.Connection; +import jakarta.jms.ConnectionFactory; +import jakarta.jms.JMSException; +import jakarta.jms.JMSSecurityException; +import jakarta.jms.Session; import static com.google.common.truth.Truth.assertThat; diff --git a/cli-qpid-jms/src/test/java/QPIDJMS451Test.java b/cli-qpid-jms/src/test/java/QPIDJMS451Test.java index 96e0ef33..ce9a0003 100644 --- a/cli-qpid-jms/src/test/java/QPIDJMS451Test.java +++ b/cli-qpid-jms/src/test/java/QPIDJMS451Test.java @@ -28,14 +28,14 @@ import util.Broker; import util.BrokerFixture; -import javax.jms.Session; -import javax.jms.TextMessage; -import javax.jms.Topic; -import javax.jms.TopicConnection; -import javax.jms.TopicConnectionFactory; -import javax.jms.TopicPublisher; -import javax.jms.TopicSession; -import javax.jms.TopicSubscriber; +import jakarta.jms.Session; +import jakarta.jms.TextMessage; +import jakarta.jms.Topic; +import jakarta.jms.TopicConnection; +import jakarta.jms.TopicConnectionFactory; +import jakarta.jms.TopicPublisher; +import jakarta.jms.TopicSession; +import jakarta.jms.TopicSubscriber; import java.nio.file.Path; class QPIDJMS451Test { diff --git a/cli-qpid-jms/src/test/java/QPIDJMS484Test.java b/cli-qpid-jms/src/test/java/QPIDJMS484Test.java index 6a7ac9f2..cc747ca7 100644 --- a/cli-qpid-jms/src/test/java/QPIDJMS484Test.java +++ b/cli-qpid-jms/src/test/java/QPIDJMS484Test.java @@ -35,11 +35,11 @@ import util.Broker; import util.BrokerFixture; -import javax.jms.Connection; -import javax.jms.Destination; -import javax.jms.Message; -import javax.jms.MessageConsumer; -import javax.jms.Session; +import jakarta.jms.Connection; +import jakarta.jms.Destination; +import jakarta.jms.Message; +import jakarta.jms.MessageConsumer; +import jakarta.jms.Session; import java.nio.file.Path; import java.util.ArrayList; import java.util.Iterator; diff --git a/cli-qpid-jms/src/test/kotlin/MessageFormatterTest.kt b/cli-qpid-jms/src/test/kotlin/MessageFormatterTest.kt index 5f68ed79..6c8aadc6 100644 --- a/cli-qpid-jms/src/test/kotlin/MessageFormatterTest.kt +++ b/cli-qpid-jms/src/test/kotlin/MessageFormatterTest.kt @@ -20,7 +20,7 @@ import com.redhat.mqe.lib.AbstractJmsMessageFormatterTest import org.apache.qpid.jms.message.JmsBytesMessage import org.apache.qpid.jms.provider.amqp.message.AmqpJmsBytesMessageFacade -import javax.jms.BytesMessage +import jakarta.jms.BytesMessage class AacJmsMessageFormatterTest : AbstractJmsMessageFormatterTest() { override fun getBytesMessage(): BytesMessage = JmsBytesMessage(AmqpJmsBytesMessageFacade()) diff --git a/cli-qpid-jms/src/test/kotlin/QPIDJMS357Test.kt b/cli-qpid-jms/src/test/kotlin/QPIDJMS357Test.kt index 5ec81b08..ee3d187d 100644 --- a/cli-qpid-jms/src/test/kotlin/QPIDJMS357Test.kt +++ b/cli-qpid-jms/src/test/kotlin/QPIDJMS357Test.kt @@ -24,9 +24,9 @@ import org.junit.jupiter.api.Tags import org.junit.jupiter.api.Test import java.math.BigInteger import java.util.* -import javax.jms.Connection -import javax.jms.ConnectionFactory -import javax.jms.Session +import jakarta.jms.Connection +import jakarta.jms.ConnectionFactory +import jakarta.jms.Session @Tags(Tag("issue"), Tag("external")) class QPIDJMS357Test { diff --git a/cli-qpid-jms/src/test/kotlin/QPIDJMS391Test.kt b/cli-qpid-jms/src/test/kotlin/QPIDJMS391Test.kt index 6f865a54..5b7cd771 100644 --- a/cli-qpid-jms/src/test/kotlin/QPIDJMS391Test.kt +++ b/cli-qpid-jms/src/test/kotlin/QPIDJMS391Test.kt @@ -32,9 +32,9 @@ import java.io.File import java.math.BigInteger import java.nio.file.Path import java.util.* -import javax.jms.Connection -import javax.jms.ConnectionFactory -import javax.jms.Session +import jakarta.jms.Connection +import jakarta.jms.ConnectionFactory +import jakarta.jms.Session @Tag("issue") class QPIDJMS391Test { diff --git a/cli-qpid-jms/src/test/kotlin/QPIDJMS502Test.kt b/cli-qpid-jms/src/test/kotlin/QPIDJMS502Test.kt index 6afa49e3..f6cd52cb 100644 --- a/cli-qpid-jms/src/test/kotlin/QPIDJMS502Test.kt +++ b/cli-qpid-jms/src/test/kotlin/QPIDJMS502Test.kt @@ -32,9 +32,9 @@ import util.Broker import java.math.BigInteger import java.nio.file.Path import java.util.* -import javax.jms.Connection -import javax.jms.ConnectionFactory -import javax.jms.Session +import jakarta.jms.Connection +import jakarta.jms.ConnectionFactory +import jakarta.jms.Session @Tag("issue") class QPIDJMS502Test { diff --git a/jakartalib/pom.xml b/jakartalib/pom.xml new file mode 100644 index 00000000..c102eb96 --- /dev/null +++ b/jakartalib/pom.xml @@ -0,0 +1,89 @@ + + + + + 4.0.0 + + + com.redhat.cli-java + parent + 1.2.2-SNAPSHOT + ../parent/pom.xml + + + jakartalib + + + + com.fasterxml.jackson.core + jackson-databind + ${jackson.version} + + + + org.checkerframework + checker-qual + + + + com.redhat.cli-java + lib + 1.2.2-SNAPSHOT + + + + + jakarta.jms + jakarta.jms-api + provided + + + + org.mockito + mockito-core + test + + + com.google.truth + truth + test + + + + + + + + maven-jar-plugin + ${plugin.jar.version} + + + + test-jar + + + + + + + + diff --git a/jakartalib/src/main/java/com/redhat/mqe/lib/AMQPJmsMessageFormatter.java b/jakartalib/src/main/java/com/redhat/mqe/lib/AMQPJmsMessageFormatter.java new file mode 100644 index 00000000..b334344c --- /dev/null +++ b/jakartalib/src/main/java/com/redhat/mqe/lib/AMQPJmsMessageFormatter.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2017 Red Hat, Inc. + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 + * + * http://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 com.redhat.mqe.lib; + +import jakarta.jms.JMSException; +import jakarta.jms.Message; +import java.util.HashMap; +import java.util.Map; + +/** + * Message output formatter to python dict, + * map, or any other object printable format. + * Reusable from old client + */ +public class AMQPJmsMessageFormatter extends JmsMessageFormatter { + public Map formatMessage(Message msg, boolean hashContent) throws JMSException { + Map result = new HashMap<>(); + addFormatJMS11(msg, result, hashContent); + addFormatJMS20(msg, result); + return result; + } +} diff --git a/jakartalib/src/main/java/com/redhat/mqe/lib/Args.java b/jakartalib/src/main/java/com/redhat/mqe/lib/Args.java new file mode 100644 index 00000000..c7ac6c28 --- /dev/null +++ b/jakartalib/src/main/java/com/redhat/mqe/lib/Args.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2017 Red Hat, Inc. + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 + * + * http://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 com.redhat.mqe.lib; + +/** + * Annotation to mark the String[] args argument for DI + */ +public @interface Args { +} diff --git a/jakartalib/src/main/java/com/redhat/mqe/lib/Client.java b/jakartalib/src/main/java/com/redhat/mqe/lib/Client.java new file mode 100644 index 00000000..7741f26b --- /dev/null +++ b/jakartalib/src/main/java/com/redhat/mqe/lib/Client.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2017 Red Hat, Inc. + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 + * + * http://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 com.redhat.mqe.lib; + +/** + * Parent interface for Dagger components + */ +public interface Client { + SenderClient makeSenderClient(); + + ReceiverClient makeReceiverClient(); + + ConnectorClient makeConnectorClient(); +} diff --git a/jakartalib/src/main/java/com/redhat/mqe/lib/ClientOptionManager.java b/jakartalib/src/main/java/com/redhat/mqe/lib/ClientOptionManager.java new file mode 100644 index 00000000..06fab8b2 --- /dev/null +++ b/jakartalib/src/main/java/com/redhat/mqe/lib/ClientOptionManager.java @@ -0,0 +1,491 @@ +/* + * Copyright (c) 2017 Red Hat, Inc. + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 + * + * http://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 com.redhat.mqe.lib; + +import joptsimple.ArgumentAcceptingOptionSpec; +import joptsimple.OptionException; +import joptsimple.OptionParser; +import joptsimple.OptionSet; +import joptsimple.OptionSpec; +import joptsimple.OptionSpecBuilder; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + + +/** + * Class provides support for parsing supplied options + * from command line for given client. + * Each supplied option is checked against template/default + * client options list, then accordingly set for client. + */ +public abstract class ClientOptionManager { + private static final Logger LOG = LoggerFactory.getLogger(ClientOptionManager.class); + /** + * Mapping from cli options to connection factory properties. + * Null value means key should not become connection factory property. + */ + protected final Map CONNECTION_TRANSLATION_MAP = new HashMap<>(); + protected Map connectionOptionsUrlMap = new HashMap<>(); + private List