Skip to content

Simple sample of how to use Spring JMS with AMQ 7 via qpid and JMS Pool

Notifications You must be signed in to change notification settings

ricardozanini/amq7-spring-samples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This example was merged with the Apache Artemis 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, QPID and JMS Pool 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 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:

<addresses>
  <address name="mailbox">
     <anycast>
         <queue name="mailbox">
             <durable>true</durable>
         </queue>
     </anycast>
   </address>
</addresses>
  1. Run the application with mvn spring-boot:run. The server should start at 8080 port and exposes /produce endpoint: http://localhost:8080/produce

  2. 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:

{
   "to":"test@test.com",
   "body":"this is my body"
}

About

Simple sample of how to use Spring JMS with AMQ 7 via qpid and JMS Pool

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages