Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ricardozanini/amq7-spring-samples
Simple sample of how to use Spring JMS with AMQ 7 via qpid and JMS Pool
https://github.com/ricardozanini/amq7-spring-samples
amqp artemis jms qpid qpid-jms spring spring-boot
Last synced: about 1 month ago
JSON representation
Simple sample of how to use Spring JMS with AMQ 7 via qpid and JMS Pool
- Host: GitHub
- URL: https://github.com/ricardozanini/amq7-spring-samples
- Owner: ricardozanini
- Created: 2018-08-02T20:05:23.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-28T23:05:50.000Z (about 6 years ago)
- Last Synced: 2024-10-04T10:12:30.224Z (about 2 months ago)
- Topics: amqp, artemis, jms, qpid, qpid-jms, spring, spring-boot
- Language: Java
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This example was merged with the [Apache Artemis](https://github.com/apache/activemq-artemis/tree/master/examples/features/standard/spring-boot-integration) project and won't receive more updates.
## AMQ7 client with Spring JMS
This is a small sample of how to send and consume messages using [Spring JMS](https://spring.io/guides/gs/messaging-jms/), [QPID](https://qpid.apache.org/components/jms/index.html) and [JMS Pool](https://github.com/messaginghub/pooled-jms) to a Red Hat AMQ7 broker. Use it as a reference for your own implementation.
Behind the scenes this sample uses [amqp-10-jms-spring-boot](https://github.com/amqphub/amqp-10-jms-spring-boot) library to set up the code infrastructure and configuration. Please take a look at its documentation to fine tune this sample for your needs.
### Configuration
1. Edit the `src/main/resources/application.yml` file and add your broker credentials to it.
2. Create the queue at your `broker.xml` file:
```xml
true
```
3. Run the application with `mvn spring-boot:run`. The server should start at `8080` port and exposes `/produce` endpoint: [http://localhost:8080/produce](http://localhost:8080/produce)
4. Hit it and a message should be sent to `mailbox` queue.
You may also use the hawtio console to send messages directly to the queue using the following format:
```json
{
"to":"[email protected]",
"body":"this is my body"
}```