Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Adding IBMMQ Discovery Agent #148

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Conversation

Ushnash
Copy link

@Ushnash Ushnash commented Dec 19, 2023

What is the purpose of this change?

Adding in the IBMMQ Discovery Agent plugin.

How was this change implemented?

Built an IBMMQ Discovery Agent using the Solace & Kafka agents as templates.

How was this change tested?

Basic unit tests & testing against IBMMQ Cloud.

Is there anything the reviewers should focus on/be aware of?

Am I following appropriate naming conventions?
Is there anything I should/shouldn't be doing?

- name: username
value: ush
- name: password
value: E5J8yGHjPTErikzOVZ0FiloP47FooNKQSTcTx5jQE-oM
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can these examples use ENV vars like ${SOME_USERNAME} since that's the preferred way?

<parent>
<groupId>com.solace.maas</groupId>
<artifactId>maas-event-management-agent-parent</artifactId>
<version>1.3.2-SNAPSHOT</version>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please update this with latest version before merging, we are currently at version 1.4.2 and will soon release 1.5.0

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other plugins don't appear to inherit from the EMA parent pom. I'll change this one to match those.

</parent>

<artifactId>ibmmq-plugin</artifactId>
<version>0.0.2-SNAPSHOT</version>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gregmeldrum question for you, shouldn't all plugin versions match maas-event-management-agent-parent based on current architecture of EMA?

<dependency>
<groupId>com.solace.maas</groupId>
<artifactId>plugin</artifactId>
<version>1.3.2-SNAPSHOT</version>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this version needs to change before merge as well.

@@ -0,0 +1,21 @@
/**
*
*/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think these empty comment blocks are needed.

@Override
public IbmMqHttpClient getClient(ConnectionDetailsEvent connectionDetailsEvent) {

log.trace("Creating IBMMQ-HTTP client for messaging service [{}].",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please user event broker instead of messaging service

public IbmMqQueueProcessor(MessagingServiceDelegateService messagingServiceDelegateService) {
super();
this.messagingServiceDelegateService = messagingServiceDelegateService;
log.debug("### In Queue Processor ###");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This log seems to be a remnant of a debugging effort

@@ -22,6 +22,7 @@
<module>local-storage-plugin</module>
<module>confluent-schema-registry-plugin</module>
<module>application</module>
<module>ibmmq-plugin</module>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also update the README files to mention this plugin and examples similar to the existing ones.

@Ushnash
Copy link
Author

Ushnash commented Feb 20, 2024

@moodiRealist
Could you please re-review the latest changes? I've addressed the feedback. Thank you!

@gregmeldrum
Copy link
Collaborator

There are some build problems with the current iteration. I tried fixing this and ran into some library version collisions. I think I fixed it all now. I can either update your original branch if you give me access to create a branch, or you can apply the following changes:

diff --git a/service/application/pom.xml b/service/application/pom.xml
index 8fa53d1..b9a370a 100644
--- a/service/application/pom.xml
+++ b/service/application/pom.xml
@@ -248,9 +248,9 @@
             <version>1.6.1-SNAPSHOT</version>
         </dependency>
        <dependency>
-            <groupId>com.solace.maas</groupId>
+            <groupId>com.solace.maas.plugin.ibmmq</groupId>
             <artifactId>ibmmq-plugin</artifactId>
-            <version>0.0.2-SNAPSHOT</version>
+            <version>1.6.1-SNAPSHOT</version>
         </dependency>

         <dependency>
diff --git a/service/ibmmq-plugin/pom.xml b/service/ibmmq-plugin/pom.xml
index c842d5e..c5fa79d 100644
--- a/service/ibmmq-plugin/pom.xml
+++ b/service/ibmmq-plugin/pom.xml
@@ -3,6 +3,7 @@
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
+    <groupId>com.solace.maas.plugin.ibmmq</groupId>
     <artifactId>ibmmq-plugin</artifactId>
     <version>1.6.1-SNAPSHOT</version>
     <name>Solace Event Management Agent - IBM MQ Plugin</name>
@@ -11,10 +12,11 @@
     <properties>
         <maven.compiler.source>17</maven.compiler.source>
         <maven.compiler.target>17</maven.compiler.target>
-        <solace.maas.ema.version>1.6.1-SNAPSHOT</solace.maas.ema.version>
-        <spring.cloud.openfeign.version>4.1.0</spring.cloud.openfeign.version>
-        <openfeign.jackson.version>13.0</openfeign.jackson.version>
+        <spring-boot-version>3.1.7</spring-boot-version>
+        <spring.cloud.openfeign.version>4.0.6</spring.cloud.openfeign.version>
+        <openfeign.jackson.version>13.2</openfeign.jackson.version>
         <okhttp.version>4.0.1</okhttp.version>
+        <camel.version>4.2.0</camel.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     </properties>

@@ -22,6 +24,7 @@
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter</artifactId>
+            <version>${spring-boot-version}</version>
         </dependency>
         <dependency>
             <groupId>org.springframework.cloud</groupId>
@@ -36,7 +39,7 @@
         <dependency>
             <groupId>com.solace.maas</groupId>
             <artifactId>plugin</artifactId>
-            <version>${solace.maas.ema.version}</version>
+            <version>1.6.1-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.camel</groupId>
@@ -48,6 +51,7 @@
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-test</artifactId>
+            <version>${spring-boot-version}</version>
             <scope>test</scope>
         </dependency>
         <dependency>
diff --git a/service/pom.xml b/service/pom.xml
index fd45818..054ea38 100644
--- a/service/pom.xml
+++ b/service/pom.xml
@@ -21,8 +21,8 @@
         <module>terraform-plugin</module>
         <module>local-storage-plugin</module>
         <module>confluent-schema-registry-plugin</module>
-        <module>application</module>
         <module>ibmmq-plugin</module>
+        <module>application</module>
     </modules>

Copy link
Collaborator

@moodiRealist moodiRealist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. @gregmeldrum do you have any final comments?

@gregmeldrum
Copy link
Collaborator

Please make the following changes and then we'll merge it:

diff --git a/service/ibmmq-plugin/pom.xml b/service/ibmmq-plugin/pom.xml
index 124676e..ade49a1 100644
--- a/service/ibmmq-plugin/pom.xml
+++ b/service/ibmmq-plugin/pom.xml
@@ -5,16 +5,16 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.solace.maas.plugin.ibmmq</groupId>
     <artifactId>ibmmq-plugin</artifactId>
-    <version>1.6.1-SNAPSHOT</version>
+    <version>1.6.2-SNAPSHOT</version>
     <name>Solace Event Management Agent - IBM MQ Plugin</name>
     <description>Solace Event Management Agent - IBM MQ Plugin</description>

     <properties>
         <maven.compiler.source>17</maven.compiler.source>
         <maven.compiler.target>17</maven.compiler.target>
-        <solace.maas.ema.version>1.6.1-SNAPSHOT</solace.maas.ema.version>
-        <spring.boot.version>3.1.7</spring.boot.version>
-        <spring.cloud.openfeign.version>4.1.0</spring.cloud.openfeign.version>
+        <solace.maas.ema.version>1.6.2-SNAPSHOT</solace.maas.ema.version>
+        <spring.boot.version>3.1.9</spring.boot.version>
+        <spring.cloud.openfeign.version>4.0.6</spring.cloud.openfeign.version>
         <openfeign.jackson.version>13.0</openfeign.jackson.version>
         <okhttp.version>4.0.1</okhttp.version>
         <camel.version>4.2.0</camel.version>
@@ -77,4 +77,4 @@
             </plugin>
         </plugins>
     </build>

@Ushnash
Copy link
Author

Ushnash commented Mar 8, 2024

I've updated some plugin internals & made the version current with the plugin. Please review @moodiRealist

<!--
<spring.cloud.openfeign.version>4.0.6</spring.cloud.openfeign.version>
<openfeign.jackson.version>13.0</openfeign.jackson.version>
-->
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the commented out code is deadcode, please remove them.

<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<solace.maas.ema.version>1.6.3-SNAPSHOT</solace.maas.ema.version>
<spring.boot.version>3.1.8</spring.boot.version>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we use spring.boot.version 3.1.9 in other places, was there a specific reason you didn't go with that version?

@gregmeldrum gregmeldrum self-requested a review March 8, 2024 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants