Annotation-driven IBM MQ integration for GuicedEE using the IBM MQ JMS client.
- Add
com.guicedee:ibmmqdependency - Define a connection on
package-info.javaor any class:@IBMMQConnectionOptions( value = "my-connection", host = "localhost", port = 1414, queueManager = "QM1", channel = "DEV.APP.SVRCONN" ) package com.example.messaging;
- Create a consumer:
@IBMMQQueueDefinition("DEV.QUEUE.1") public class OrderConsumer implements IBMMQConsumer { @Override public void consume(Message message) { // process message } }
- Inject a publisher:
@Inject @Named("DEV.QUEUE.1") private IBMMQPublisher publisher;
- Configure
module-info.java:module my.app { requires com.guicedee.ibmmq; opens my.app.messaging to com.google.guice, com.guicedee.ibmmq; }
Every annotation attribute can be overridden at runtime:
IBMMQ_{NORMALIZED_NAME}_{PROPERTY}— name-specific overrideIBMMQ_{PROPERTY}— global fallback
Apache License 2.0