forked from ibm-messaging/mq-dev-patterns
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# AMQP QPID to IBM MQ samples | ||
These use QPID client libraries to publish / subscribe and put / get messages to | ||
topics and queues on IBM MQ. | ||
|
||
## AMQP Service in IBM MQ | ||
These samples need the IBM MQ AMQP Service to be running. As the samples use | ||
both queues and topics IBM MQ must be at 9.2.1.0 or above. | ||
|
||
### Container Image | ||
To enable the IBM MQ AMQP service in the container image, you will need to customise it. | ||
. Clone the mq-container [GtiHub repository](https://github.com/ibm-messaging/mq-container) | ||
|
||
. Edit the file `install-mq.sh` and set to enable AMQP | ||
|
||
```` | ||
export genmqpkg_incamqp=1 | ||
```` | ||
|
||
. Add the contents of `add-dev.mqsc.tpl` from this repository to the bottom of the file `/incubating/mqadvanced-server-dev/10-dev.mqsc.tpl`. | ||
|
||
. Build a developer image following the instructions in the [mq-container repository](https://github.com/ibm-messaging/mq-container/blob/master/docs/building.md) | ||
|
||
. Run the container. If you have tagged your image with `ibm-mqadvanced-server-dev:9.2.1.0-amd64` then you can run it with the command | ||
|
||
```` | ||
docker run --env LICENSE=accept --env MQ_QMGR_NAME=QM1 --env MQ_APP_PASSWORD=passw0rd --publish 1414:1414 --publish 9443:9443 --publish 5672:5672 --detach ibm-mqadvanced-server-dev:9.2.1.0-amd64 | ||
```` | ||
|
||
## AMQP QPID samples | ||
There are two sets of samples. | ||
. [qpid-standard](/qpid-standard/README.md) | ||
. [qpid-quarkus]((/qpid-quarkus/README.md)) | ||
Most of the code is common, and shared through symbolic links. Each has its own | ||
maven `pom.xml` and build and run instructions. | ||
|
||
## Run configurations and options | ||
Each set of samples has its own mechanism for configuration. | ||
. [qpid-standard](/qpid-standard/README.md) uses command line arguments, JNDI and an associated `src/main/resources/jndi.prpperties` file. | ||
. [qpid-quarkus]((/qpid-quarkus/README.md)) uses | ||
a quarkus `src/main/resources/application.properties` file | ||
|
||
### Options | ||
The options are the same |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
* © Copyright IBM Corporation 2020 | ||
* | ||
* | ||
* Licensed 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. | ||
|
||
* These are additional MQSC Settings for AMQP | ||
* defining developer channel authentication rules for AMQP | ||
|
||
* Developer authority records | ||
* Modification of an existing container setting | ||
* to switch on ALTUSR for GET on Queues to work | ||
SET AUTHREC PRINCIPAL('app') OBJTYPE(QMGR) AUTHADD(CONNECT,INQ,ALTUSR) | ||
|
||
SET CHLAUTH('SYSTEM.DEF.AMQP') TYPE(ADDRESSMAP) ADDRESS('*') USERSRC(CHANNEL) CHCKCLNT({{ .ChckClnt }}) DESCR('Allows connection via APP channel') ACTION(REPLACE) | ||
|
||
SET AUTHREC PROFILE('SYSTEM.BASE.TOPIC') PRINCIPAL('app') OBJTYPE(TOPIC) AUTHADD(PUB,SUB) | ||
SET AUTHREC PROFILE('SYSTEM.DEFAULT.MODEL.QUEUE') PRINCIPAL('app') OBJTYPE(QUEUE) AUTHADD(PUT,DSP) | ||
|
||
ALTER CHANNEL(SYSTEM.DEF.AMQP) CHLTYPE(AMQP) MCAUSER('app') | ||
|
||
* Start AMQP service | ||
START SERVICE(SYSTEM.AMQP.SERVICE) | ||
START CHANNEL(SYSTEM.DEF.AMQP) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Quarkus AMQP QPID to IBM MQ samples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Standard AMQP QPID to IBM MQ samples |