Skip to content

F7502/lcm-jms-helloworld

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lcm-jms-helloworld

A simple example of using Java Message Service (JMS) for sending and receiving messages to/from a queue.

The project contains two classes, each with its own main method.

HelloWorldActiveMQ.java demonstrates how to use JMS with ActiveMQ. Please refer to JMS_HelloWorld.pdf or JMS_HelloWorld.docx for more documentation on this example.

HelloWorldSQS.java demonstrates how to use JMS with AWS SQS (Amazon Web Services - Simple Queue Service). The main method first connects to SQS, then sends a text message, receives a text message, and finally closes the connection. To get the example running, two things have to be prepared:

  • Add your AWS API credentials, the access key and the secret key, to src/main/resources/aws.properties (you may use aws.properties.example as a template)
    Note: Do not rename aws.properties.example to aws.properties but rather create a new file named aws.properties instead.
    Otherwise, Git will no longer ignore the file, possibly resulting in your AWS credentials being committed and pushed and available to everyone.
  • Create a SQS queue, e.g. using the AWS console, and then adjust private static final String queueName = "..." accordingly (HelloWorldSQS.java, line 41)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages