org.apache.camel
@@ -55,13 +53,13 @@
com.squareup.okhttp3
okhttp
- 4.0.1
+ ${okhttp.version}
test
com.squareup.okhttp3
mockwebserver
- 4.0.1
+ ${okhttp.version}
test
diff --git a/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/client/http/IbmMqHttpClient.java b/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/client/http/IbmMqHttpClient.java
index 292bf8c2..6d535509 100644
--- a/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/client/http/IbmMqHttpClient.java
+++ b/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/client/http/IbmMqHttpClient.java
@@ -4,7 +4,7 @@
import org.springframework.web.bind.annotation.GetMapping;
/**
- * Uses OpenFeign to create the MQ REST API Admin Client.
+ * Interface for OpenFeign to create the IBM MQ REST API Admin Client.
*/
@FeignClient(name = "ibmmq-http-client")
public interface IbmMqHttpClient {
diff --git a/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/client/http/IbmMqQueueResponse.java b/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/client/http/IbmMqQueueResponse.java
index 1d6f7da3..d27b6a2a 100644
--- a/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/client/http/IbmMqQueueResponse.java
+++ b/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/client/http/IbmMqQueueResponse.java
@@ -5,6 +5,10 @@
import java.util.List;
+/**
+ * Represents the response JSON from the IBM MQ Admin client
+ * when querying for Queue information.
+ */
@Getter
public class IbmMqQueueResponse {
diff --git a/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/client/http/IbmMqSubscriptionResponse.java b/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/client/http/IbmMqSubscriptionResponse.java
index bb54df2f..e64b6d3c 100644
--- a/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/client/http/IbmMqSubscriptionResponse.java
+++ b/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/client/http/IbmMqSubscriptionResponse.java
@@ -5,6 +5,10 @@
import java.util.List;
+/**
+ * Represents the response JSON from the IBM MQ Admin client
+ * when querying for Subscription (topic) information.
+ */
@Data
public class IbmMqSubscriptionResponse {
diff --git a/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/manager/client/IbmMqClientConfigImpl.java b/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/manager/client/IbmMqClientConfigImpl.java
index e710520a..8eb4460a 100644
--- a/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/manager/client/IbmMqClientConfigImpl.java
+++ b/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/manager/client/IbmMqClientConfigImpl.java
@@ -1,14 +1,8 @@
-/**
- *
- */
package com.solace.maas.ep.event.management.agent.plugin.ibmmq.manager.client;
import com.solace.maas.ep.event.management.agent.plugin.manager.client.MessagingServiceClientConfig;
import org.springframework.context.annotation.Configuration;
-/**
- *
- */
@Configuration
public class IbmMqClientConfigImpl extends MessagingServiceClientConfig {
diff --git a/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/manager/client/IbmMqClientManagerImpl.java b/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/manager/client/IbmMqClientManagerImpl.java
index 15bfb4e9..9bce9d01 100644
--- a/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/manager/client/IbmMqClientManagerImpl.java
+++ b/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/manager/client/IbmMqClientManagerImpl.java
@@ -1,6 +1,3 @@
-/**
- *
- */
package com.solace.maas.ep.event.management.agent.plugin.ibmmq.manager.client;
import com.fasterxml.jackson.databind.DeserializationFeature;
@@ -22,7 +19,9 @@
import java.util.NoSuchElementException;
/**
- *
+ * Implementation of the IBM MQ Administration client.
+ *
+ * This client provides access to the various administrative endpoints exposed by IBM MQ.
*/
@Slf4j
@Data
@@ -35,9 +34,10 @@ public IbmMqClientManagerImpl() {
@Override
public IbmMqHttpClient getClient(ConnectionDetailsEvent connectionDetailsEvent) {
- log.trace("Creating IBMMQ-HTTP client for messaging service [{}].",
+ log.trace("Creating IBM MQ RESTful client for event broker [{}].",
connectionDetailsEvent.getMessagingServiceId());
+ //get authentication details from config file
AuthenticationDetailsEvent authenticationDetailsEvent = connectionDetailsEvent.getAuthenticationDetails()
.stream()
.findFirst().orElseThrow(() -> {
@@ -51,20 +51,19 @@ public IbmMqHttpClient getClient(ConnectionDetailsEvent connectionDetailsEvent)
String password = MessagingServiceConfigurationUtil.getPassword(authenticationDetailsEvent);
String url = connectionDetailsEvent.getUrl();
- //so that we can configure Jackson
+ /*so that we can configure Jackson to ignore unknown properties in the
+ response json.
+ */
ObjectMapper mapper = JsonMapper
.builder()
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
.build();
-
- IbmMqHttpClient client = Feign.builder()
+ return Feign.builder()
.requestInterceptor(new BasicAuthRequestInterceptor(username, password))
.contract(new SpringMvcContract())
.decoder(new JacksonDecoder(mapper))
.target(IbmMqHttpClient.class, url);
-
- return client;
}
}
diff --git a/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/processor/IbmMqQueueProcessor.java b/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/processor/IbmMqQueueProcessor.java
index c580df25..d582da5c 100644
--- a/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/processor/IbmMqQueueProcessor.java
+++ b/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/processor/IbmMqQueueProcessor.java
@@ -22,7 +22,6 @@ public class IbmMqQueueProcessor extends ResultProcessorImpl handleEvent(Map properties, Void bo
IbmMqHttpClient client = messagingServiceDelegateService.getMessagingServiceClient(messagingServiceId);
- log.info("### Invoking Queue endpoint for messaging service with ID {}", messagingServiceId);
+ log.info("### Invoking Queue endpoint for broker with ID {}", messagingServiceId);
IbmMqQueueResponse queueList = client.getQueues();
return queueList.getQueue();
diff --git a/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/processor/IbmMqSubscriptionProcessor.java b/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/processor/IbmMqSubscriptionProcessor.java
index e953e4da..61520a2e 100644
--- a/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/processor/IbmMqSubscriptionProcessor.java
+++ b/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/processor/IbmMqSubscriptionProcessor.java
@@ -22,7 +22,6 @@ public class IbmMqSubscriptionProcessor extends ResultProcessorImpl handleEvent(Map properties,
IbmMqHttpClient client = messagingServiceDelegateService.getMessagingServiceClient(messagingServiceId);
- log.info("### Invoking Queue endpoint for messaging service with ID {}", messagingServiceId);
+ log.info("### Invoking Queue endpoint for broker with ID {}", messagingServiceId);
IbmMqSubscriptionResponse subscriptionList = client.getSubscriptions();
return subscriptionList.getSubscription();
diff --git a/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/processor/event/IbmMqQueueEvent.java b/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/processor/event/IbmMqQueueEvent.java
index 08b50a82..f9ad31ac 100644
--- a/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/processor/event/IbmMqQueueEvent.java
+++ b/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/processor/event/IbmMqQueueEvent.java
@@ -4,6 +4,10 @@
import java.io.Serializable;
+/**
+ * Attributes parsed from the response JSON.
+ * Note: Other attributes may be returned in the raw JSON.
+ */
@Getter
public class IbmMqQueueEvent implements Serializable {
diff --git a/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/processor/event/IbmMqSubscriptionEvent.java b/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/processor/event/IbmMqSubscriptionEvent.java
index 0067feb0..df9d5e65 100644
--- a/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/processor/event/IbmMqSubscriptionEvent.java
+++ b/service/ibmmq-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/ibmmq/processor/event/IbmMqSubscriptionEvent.java
@@ -4,6 +4,10 @@
import java.io.Serializable;
+/**
+ * Attributes parsed from the response JSON.
+ * Note: Other attributes may be returned in the raw JSON.
+ */
@Data
public class IbmMqSubscriptionEvent implements Serializable {
From 696d92d01cee9480dec65eeaa6672aef5610ee7b Mon Sep 17 00:00:00 2001
From: Ush Shukla <21085773+Ushnash@users.noreply.github.com>
Date: Wed, 21 Feb 2024 23:06:33 +0100
Subject: [PATCH 3/5] updating/adding version numbers
---
service/application/pom.xml | 4 ++--
service/ibmmq-plugin/pom.xml | 5 +++++
service/pom.xml | 2 +-
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/service/application/pom.xml b/service/application/pom.xml
index 8fa53d15..b9a370a8 100644
--- a/service/application/pom.xml
+++ b/service/application/pom.xml
@@ -248,9 +248,9 @@
1.6.1-SNAPSHOT