Skip to content

feat: implement IBM MQ AsyncAPI mocking support (#1342) - #2217

Merged
lbroudoux merged 2 commits into
microcks:masterfrom
alokkumardalei-wq:issue-1342-ibmmq-mocking
Sep 24, 2026
Merged

lbroudoux merged 2 commits into
microcks:masterfrom
alokkumardalei-wq:issue-1342-ibmmq-mocking

Conversation

@alokkumardalei-wq

Copy link
Copy Markdown
Contributor

Description

This PR implements the requested mocking support for IBM MQ via AsyncAPI, addressing #1342. With this change, Microcks can now mock producer behavior and publish asynchronous event messages directly to an IBM MQ instance.

Key Changes

  • Added IBMMQ to the BindingType enumeration.
  • Configured default IBM MQ properties in application.properties for the minion (ibmmq.server, ibmmq.queue-manager, etc.).
  • Included the com.ibm.mq.allclient dependency in the microcks-async-minion pom.xml.
  • Implemented IBMMQProducerManager.java to handle connection lifecycle and publishing logic over IBM MQ.
  • Injected IBMMQProducerManager into the central ProducerManager.java orchestration layer to route IBMMQ bindings to our new manager.
  • Updated unit tests (ProducerManagerTest.java and related integration tests) to account for the new constructor dependency.

Testing and Validation

Since Apple Silicon (arm64) does not currently natively support the ibmcom/mq Docker images without Rosetta's x86-64-v3 emulation support, local containerized testing fails on M-series chips.

Validation should be performed via the CI/CD pipeline which will verify:

  • Compilation succeeds and Spotless code formatting is enforced (verified locally via mvn clean install).
  • Core functionality operates as expected when a mocked IBM MQ service is triggered.

If you have a remote IBM MQ server available or are running on an x86 host, you can test this locally by:

  1. Setting up an IBM MQ instance.
  2. Modifying the minion properties in your config (ibmmq.server, ibmmq.queue-manager, etc.).
  3. Uploading an AsyncAPI spec with an ibmmq binding to Microcks.
  4. Triggering a mock message and verifying it arrives at the expected destination queue on your MQ server!

Fixes #1342

@lbroudoux

Copy link
Copy Markdown
Member

This is a great contribution! Thank you. I'll start reviewing this asap.

@lbroudoux

lbroudoux commented Sep 9, 2026 •

Copy link
Copy Markdown
Member

I think I got it running on my M4 using the following command:

docker run --platform=linux/amd64 --rm -p 1414:1414 -p 9443:9443 -e LICENSE=accept icr.io/ibm-messaging/mq:9.3.2.0-r2

Is it correct?

@lbroudoux

Copy link
Copy Markdown
Member

Hooray! 🎉

I got access to the web console on https://localhost:9443

Capture d’écran 2026-09-09 à 11 29 32

@lbroudoux

Copy link
Copy Markdown
Member

PR looks great but you didn't include a test ... It seems that a Testcontainers module for MQ exists though: https://testcontainers.com/modules/ibmmq/

@lbroudoux lbroudoux left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It looks great! I just have 2 questions:

  • I don't see any logic for queue creation. Are queues auto-created on the Queue Manager when they don't exist? Isn't there any option like persistence to provide?
  • I don't see anything related to headers publication? Is it intentional to left them aside for this first iteration?

Thnaks a lot and thanks for your patience!

@lbroudoux

Copy link
Copy Markdown
Member

Hey @alokkumardalei-wq
Any opportunity to check my reviews on your MQ-related PRs?

@alokkumardalei-wq

alokkumardalei-wq commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor Author

Hey @alokkumardalei-wq Any opportunity to check my reviews on your MQ-related PRs?

Hi @lbroudoux, thanks for your time in reviewing my prs 🙂! got busy with some work I'm taking a look at your feedback now.

@lbroudoux lbroudoux added this to the 1.16.0 milestone Sep 24, 2026
@lbroudoux

Copy link
Copy Markdown
Member

As we're close to the deadline of 1.1.6.0 and I have no new activity on this PR, I'm going to resolve comments, merge it as is, and finalize things.

@lbroudoux
lbroudoux merged commit c006bf6 into microcks:master Sep 24, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IBM MQ AsyncAPI mocking support

2 participants